| From: | Jiho Lee <jiho99322(at)gmail(dot)com> |
|---|---|
| To: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: PGC_S_ARGV vs pg_file_settings and pg_settings |
| Date: | 2026-11-25 06:07:17 |
| Message-ID: | CAFK+_hcCAv_bWQ2ynjwHL-bpayex1ohGtga8MoBR9ZGkqYGDKg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Thu, Oct 29, 2026, Jehan-Guillaume de Rorthais wrote:
> Please, find in attachment a patch fixing the later incoherence, and returning
> -1 instead of 0 if a GUC in config file is overridden by any mean when
> prohibitValueChange applies.
I agree the error for a value overridden on the command line is
misleading. But skipping the check whenever the current source has
higher priority than the file also covers PGC_S_OVERRIDE, and that is
what auto-tuned parameters use at startup when they are set in the
file (wal_buffers, transaction_buffers, subtransaction_buffers,
commit_timestamp_buffers, io_max_concurrency).
For those, a change in the file does matter, because the override is
recomputed from the file at the next start. With v1 applied to
master, I set them to auto in postgresql.conf, restarted, then changed
transaction_buffers from 0 to 64, io_max_concurrency from -1 to 8 and
wal_buffers from -1 to 1024 and reloaded. pending_restart stayed f
for all three and there was no "cannot be changed without restarting"
message, only "setting ignored because previous source is higher
priority", although a restart would change all three values. Without
the patch, wal_buffers is reported correctly today.
A command-line value, on the other hand, is still in effect after a
restart, so ignoring the file there seems right. Would it work to
limit the new branch to record->source == PGC_S_ARGV (or at least
exclude PGC_S_OVERRIDE)?
The auto-tuned parameters have a separate false positive of their own
(unchanged settings reported as pending restart after every reload),
which I posted a fix for in the check hooks here:
https://postgr.es/m/CAFK+_hc=W86cqxmGrgcAeJxnf3uG9r-bsna5dAdW29kL4DjMRg@mail.gmail.com
Your patch happens to hide that one too, which is how I came across it.
Regards,
Jiho Lee
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tender Wang | 2026-11-25 06:09:25 | Preserve presorted ORDER BY keys when reordering DISTINCT ON keys |
| Previous Message | Peter Smith | 2026-11-25 06:04:27 | Re: [PATCH] Table sync race with REFRESH PUBLICATION |