Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Nathan Bossart <nathandbossart@gmail.com>,
Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-07-10T16:02:25Z
Lists: pgsql-hackers
On 2024/07/10 23:18, Nathan Bossart wrote: > On Wed, Jul 10, 2024 at 10:10:30AM -0400, Robert Haas wrote: >> On Wed, Jul 10, 2024 at 1:56 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: >>> I'm sure this patch is necessary as a safeguard for WAL summarization. >>> OTOH, I also think we should apply the patch I proposed earlier >>> in this thread, which prevents summarize_wal from being enabled >>> when wal_level is set to minimal. This way, if there's >>> a misconfiguration, users will see an error message and >>> can quickly identify and fix the issue. Thought? >> >> I interpreted these emails as meaning that we should not proceed with >> that approach: >> >> https://www.postgresql.org/message-id/CAGECzQR2r-rHFLQr5AonFehVP8DiFH+==R2yqdBvunYnwxsXNA@mail.gmail.com >> http://postgr.es/m/3253790.1720019802@sss.pgh.pa.us > > Yeah. I initially thought this patch might be okay, at least as a stopgap, > but Jelte pointed out a case where it doesn't work, namely when you have > something like the following in the config file: > > wal_level = 'minimal' > summarize_wal = 'true' > wal_level = 'logical' Unless I'm mistaken, the patch works fine in this case. If the check_hook triggered every time a parameter appears in the configuration file, it would mistakenly detect wal_level=minimal and summarize_wal=on together and raise an error. However, this isn't the case. The check_hook is designed to trigger after duplicate parameters are deduplicated. Am I missing something? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
Do not summarize WAL if generated with wal_level=minimal.
- 2b5819e2b4d6 17.0 landed
- 402b586d0a9c 18.0 landed
-
Revert "Auto-tune effective_cache size to be 4x shared buffers"
- a16d421ca4fc 9.4.0 cited
-
Un-break ecpg test suite under --disable-integer-datetimes.
- 08c8e8962f56 9.4.0 cited
-
Again fix initialization of auto-tuned effective_cache_size.
- af930e606a32 9.4.0 cited
-
Code review for auto-tuned effective_cache_size.
- 285089696199 9.4.0 cited
-
Auto-tune effective_cache size to be 4x shared buffers
- ee1e5662d8d8 9.4.0 cited