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_”.
SELECT * FROM pg_settings WHERE name LIKE 'log_%';
The result will be as follows;
Here are some explanations about some areas.
|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.
internal, postmaster, sighup, superuser-backend, backend, superuser, user
|enumvals||A list of values that can be changed if it is not a numeric value.|
|pending_restart||If a value that requires a restart has been changed, but has not yet been restarted.
“t” or “f”
When changing a setting, you do not need to search for the previous values of the setting on the Internet.