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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How about a psql backslash command to show GUCs?
Дата
Msg-id 918042.1654531335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How about a psql backslash command to show GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: How about a psql backslash command to show GUCs?  (Robert Haas <robertmhaas@gmail.com>)
Re: How about a psql backslash command to show GUCs?  (Mark Dilger <mark.dilger@enterprisedb.com>)
Список pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> I noticed this is showing "pre-computed" gucs, like:
>  shared_memory_size                | 149MB
>  shared_memory_size_in_huge_pages  | 75
> I'm not opposed to that, but I wonder if that's what's intended / best.

I had suggested upthread that we might want to hide items with
source = 'override', but that idea didn't seem to be getting traction.
A different idea is to hide items with context = 'internal'.
Looking at the items selected by the current rule in a default
installation:

postgres=# SELECT s.name, source, context FROM pg_catalog.pg_settings s
WHERE s.source <> 'default' AND
      s.setting IS DISTINCT FROM s.boot_val
ORDER BY 1;
               name               |        source        |  context   
----------------------------------+----------------------+------------
 TimeZone                         | configuration file   | user
 application_name                 | client               | user
 client_encoding                  | client               | user
 config_file                      | override             | postmaster
 data_directory                   | override             | postmaster
 default_text_search_config       | configuration file   | user
 hba_file                         | override             | postmaster
 ident_file                       | override             | postmaster
 lc_messages                      | configuration file   | superuser
 log_timezone                     | configuration file   | sighup
 max_stack_depth                  | environment variable | superuser
 shared_memory_size               | override             | internal
 shared_memory_size_in_huge_pages | override             | internal
 wal_buffers                      | override             | postmaster
(14 rows)

So hiding internal-context items would hit exactly the two you mention,
but hiding override-source items would hit several more.

(I'm kind of wondering why wal_buffers is showing as "override";
that seems like a quirk.)

Thoughts?

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: pgcon unconference / impact of block size on performance
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: pg_buffercache: add sql test