Re: How about a psql backslash command to show GUCs?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Christoph Berg <myon(at)debian(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, David Rowley <dgrowleyml(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: How about a psql backslash command to show GUCs?
Date: 2022-04-11 20:11:22
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Jonathan S. Katz" <jkatz(at)postgresql(dot)org> writes:
> My question is if we're only going to list out the settings that are
> customized, are we going to:

> 1. Hide a setting if it matches a default value, even if a user set it
> to be the default value? OR
> 2. Comment out all of the settings in a generated postgresql.conf file?

As committed, it prints anything that's shown as "source != 'default'"
in pg_settings, which means anything for which the value wasn't
taken from the wired-in default. I suppose an alternative definition
could be "setting != boot_val". Not really sure if that's better.

This idea does somewhat address my unhappiness upthread about printing
values with source = 'internal', but I see that it gets confused by
some GUCs with custom show hooks, like unix_socket_permissions.
Maybe it needs to be "source != 'default' AND setting != boot_val"?

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message sirisha chamarthi 2022-04-11 20:11:40 Documentation issue with pg_stat_recovery_prefetch
Previous Message Markus Wanner 2022-04-11 19:45:59 Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.]