Finding parameters with non-default settings
Often, we need to check which parameters have been changed, or whether our changes have taken effect correctly.
In the previous two recipes, we have seen that parameters can be changed in several ways and with different scopes. You learned how to inspect the value of one parameter or get a full list of parameters.
In this recipe, we will show you how to use SQL capabilities to list only those parameters whose value in the current session differs from the system-wide default value.
This list is valuable for several reasons. First, it includes only a few of the 200+ available parameters, so it is more immediate. Also, it is difficult to remember all our past actions, especially in the middle of a long or complicated session.
How to do it…
We write an SQL query that lists all parameter values, excluding those whose current value is either the default or set from a configuration file:
postgres=# SELECT name, source...