Here are some ways to check PostgreSQL parameters

Quick check which configuration file is loaded into the instance.

# show config_file;
               config_file              
-----------------------------------------
 /var/lib/pgsql/9.4/data/postgresql.conf

Check single parameter value

# show effective_cache_size;
 effective_cache_size
----------------------
 6GB
(1 row)

# show work_mem;
 work_mem
----------
 128MB

Check all parameters

# show all;
              name      |            setting          |         description                                     
                   
------------------------+-----------------------------+--------------------------------------
 allow_system_table_mods| off                         | Allows modifications of
the structure of system tables.
 application_name       | psql                        | Sets the application name to be
reported in statistics and logs.
 archive_command        | /bin/cp -p %p
/data/backups/archivelogs/%f
</dev/null | Sets the shell command that will
be called to archive a WAL file.
 archive_mode           | on                          | Allows archiving of WAL files using
archive_command.
 archive_timeout        | 0                           | Forces a switch to the next xlog file
if a new file has not been started
within N seconds.
 array_nulls            | on                          | Enable input of NULL elements in arrays.

Check current connection

\conninfo
You are connected to database "postgres" as user "postgres" via socket in "/tmp" at port "5432".

 

 

Comments powered by CComment