From: | Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
Subject: | Re: How about a psql backslash command to show GUCs? |
Date: | 2022-04-07 08:34:00 |
Message-ID: | afcb2e9e-cb7f-6798-0b28-4cf19a43260c@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 06.04.2022 20:48, Tom Lane wrote:
> However, I very often
> find myself resorting to the much more tedious
>
> select * from pg_settings where name like '%foo%';
> In the discussion about adding privileges for GUCs [1], there
> was a proposal to add a new psql backslash command to show GUCs,
> which could reduce this problem to something like
>
> \dcp *foo*
+1, great idea.
Right now I use the psql :show variable in my .psqlrc for this purpose:
=# \echo :show
SELECT name, current_setting(name) AS value, context FROM pg_settings\g
(format=wrapped columns=100) | grep
=# :show autovacuum
autovacuum |
on | sighup
autovacuum_analyze_scale_factor |
0.1 | sighup
autovacuum_analyze_threshold |
50 | sighup
autovacuum_freeze_max_age |
200000000 | postmaster
autovacuum_max_workers |
3 | postmaster
autovacuum_multixact_freeze_max_age |
400000000 | postmaster
autovacuum_naptime |
1min | sighup
autovacuum_vacuum_cost_delay |
2ms | sighup
autovacuum_vacuum_cost_limit |
-1 | sighup
autovacuum_vacuum_scale_factor |
0.2 | sighup
autovacuum_vacuum_threshold |
50 | sighup
autovacuum_work_mem |
-1 | sighup
log_autovacuum_min_duration |
-1 | sighup
As for the name, I can't think of a better candidate. Any of the
previously suggested list of \dconf, \dguc, \dG, \dcp is fine.
--
Pavel Luzanov
Postgres Professional: https://postgrespro.com
The Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-04-07 08:36:30 | Re: pgsql: Prefetch data referenced by the WAL, take II. |
Previous Message | Matthias van de Meent | 2022-04-07 08:33:52 | Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas |