PostgreSQL – List settings details

 

One of the features facilitating the management of PostgreSQL is that it hosts its basic document.

We can easily learn a brief description of a configuration, what values it can take or who can change it by asking the server.

This information applies to the extensions that we add to PostgreSQL from outside.

Of course, the same information and much more details are written in the documentation available on the Internet. When making changes to a parameter, it’s always more practical to see a description of the value you’ll change next to the parameter.

For example, look at the log settings on the postgresql.conf file;

 

As you can see, all descriptions are written next to the settings. If you need to restart the service when you change a parameter, you can find this information here. (change requires restart)

Now let’s look at the same settings with the sql query;

In the following query we list the settings whose name starts with “log_”.

 

The result will be as follows;

 

Here are some explanations about some areas.

name Parameter name
setting Current value
category setting group
short_desc short description
context Some users can change some of their settings for their own session, while only super-users can change their settings.

Some settings require a service restart, some settings cannot be changed again after the initdb phase. That is, it cannot be changed again after the cluster has been created.

Possible values:

internal, postmaster, sighup, superuser-backend, backend, superuser, user

min_val minimum value
max_val maximum value
enumvals A list of values that can be changed if it is not a numeric value.
reset_val default value
pending_restart If a value that requires a restart has been changed, but has not yet been restarted.

Possible values:

“t” or “f”

When changing a setting, you do not need to search for the previous values of the setting on the Internet.

Şahap Aşçı
Author: Şahap Aşçı

Leave a Reply

Your email address will not be published. Required fields are marked *