pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_file_settings
3+ messages / 2 participants
[nested] [flat]
* pg_file_settings
@ 2023-12-26 07:13 Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Rıdvan Korkmaz @ 2023-12-26 07:13 UTC (permalink / raw)
To: pgsql-admin
Hi,
When I read the docs for pg_file_settings view on pg_file_settings
<https://www.postgresql.org/docs/current/view-pg-file-settings.html;
.... "This view is helpful for checking whether planned changes in the
configuration files will work, or for diagnosing a previous failure. Note
that this view reports on the current contents of the files, not on what
was last applied by the server. (The pg_settings view is usually sufficient
to determine that.)"
But the following test shows the opposite.
When the parameter value is "on" for *log_connections, *there is *no error
for value*, which is the expected case.
But If I change the value in postgresql.conf to *"dummy"* then re-run the
query, this time *I expected the error column to show error*,* but again it
is null, *which means, I potentially apply this value to the parameter.
Is there something I am missing?
client and server is 16.1 from the RPM package.
[image: cd3fc508-eee0-47d9-bf26-d20cb225b89c.png]
Rıdvan Korkmaz
Attachments:
[image/png] cd3fc508-eee0-47d9-bf26-d20cb225b89c.png (38.9K, ../../CAK30z9T9gaF_isNquccZxi7agXCSjPjMsFXiifmkfu4VpZguxw@mail.gmail.com/3-cd3fc508-eee0-47d9-bf26-d20cb225b89c.png)
download | view image
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_file_settings
@ 2023-12-26 18:12 Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>
parent: Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Rıdvan Korkmaz @ 2023-12-26 18:12 UTC (permalink / raw)
To: pgsql-admin
I removed the attachment,and pasted the text output.
In order to summarize things in first mail, from the documentation, we
expect to see relevant errors in the "error" column of pg_file_setitings
view for an invalid value of parameter.
[postgres@pg16 global]$ psql testdb
psql (16.1)
Type "help" for help.
testdb=# select * from pg_file_settings where name = 'log_connections';
sourcefile | sourceline | seqno | name |
setting | applied | error
----------------------------+------------+-------+-----------------+---------+---------+-------
/pg/data16/postgresql.conf | 560 | 26 | log_connections | *on
*| t |
(1 row)
testdb=# exit
[postgres@pg16 global]$ vi /pg/data16/postgresql.conf
[postgres@pg16 global]$ psql testdb
psql (16.1)
Type "help" for help.
testdb=# select * from pg_file_settings where name = 'log_connections';
sourcefile | sourceline | seqno | name |
setting | applied | error
----------------------------+------------+-------+-----------------+---------+---------+-------
/pg/data16/postgresql.conf | 560 | 26 | log_connections | *dummy
*| t |
(1 row)
testdb=#
Rıdvan Korkmaz
Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>, 26 Ara 2023 Sal, 10:13
tarihinde şunu yazdı:
> Hi,
>
> When I read the docs for pg_file_settings view on pg_file_settings
> <https://www.postgresql.org/docs/current/view-pg-file-settings.html;
>
>
>
> .... "This view is helpful for checking whether planned changes in the
> configuration files will work, or for diagnosing a previous failure. Note
> that this view reports on the current contents of the files, not on what
> was last applied by the server. (The pg_settings view is usually sufficient
> to determine that.)"
>
>
>
> But the following test shows the opposite.
>
> When the parameter value is "on" for *log_connections, *there is *no
> error for value*, which is the expected case.
>
> But If I change the value in postgresql.conf to *"dummy"* then re-run the
> query, this time *I expected the error column to show error*,* but again
> it is null, *which means, I potentially apply this value to the
> parameter.
>
>
>
> Is there something I am missing?
>
>
>
> client and server is 16.1 from the RPM package.
>
>
> [image: cd3fc508-eee0-47d9-bf26-d20cb225b89c.png]
>
> Rıdvan Korkmaz
>
Attachments:
[image/png] cd3fc508-eee0-47d9-bf26-d20cb225b89c.png (38.9K, ../../CAK30z9TLFenreqjg443JV-S88w=VajLMdmHqCMej6Eki5752pg@mail.gmail.com/3-cd3fc508-eee0-47d9-bf26-d20cb225b89c.png)
download | view image
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_file_settings
@ 2023-12-26 19:22 Tom Lane <tgl@sss.pgh.pa.us>
parent: Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2023-12-26 19:22 UTC (permalink / raw)
To: Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>; +Cc: pgsql-admin
=?UTF-8?Q?R=C4=B1dvan_Korkmaz?= <serkan.ridvan.korkmaz@gmail.com> writes:
> In order to summarize things in first mail, from the documentation, we
> expect to see relevant errors in the "error" column of pg_file_setitings
> view for an invalid value of parameter.
Thanks for the report. It mostly does work, but not for
'log_connections', and it turns out also not for other PGC_BACKEND
GUCs (of which there are only half a dozen, probably explaining how
this didn't get noticed). I posted a proposed fix at [1].
regards, tom lane
[1] https://www.postgresql.org/message-id/2089235.1703617353%40sss.pgh.pa.us
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-12-26 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-12-26 07:13 pg_file_settings Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>
2023-12-26 18:12 ` Rıdvan Korkmaz <serkan.ridvan.korkmaz@gmail.com>
2023-12-26 19:22 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox