List Settings In postgresql.conf and


There are places in PostgreSQL that we can still see the old and new values at the same time. One of them pg_settings table. This post shows how to list all the settings from postgresql.conf and those that overrode. Note that we tested this post with PostgreSQL 10.5.

PostgreSQL Configration from postgresql.conf and

When PostgreSQL starts up for the first time, it loads configuration from a number of files. Two of them are postgresql.conf and

SQL Statements Used

List settings defined in postgresql.conf and overridden by

Alter settings

If context equal to postmaster, changing this parameter requires a restart of the PostgreSQL service. If it’s equal to user, changes just require a reload to take effect globally.

Note that restarting PostgreSQL terminates active connections.

Reloading after settings change

When we check the settings again, we will have:

You Might Also Like