Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-07-10T16:29:46Z
Lists: pgsql-hackers
On Thu, Jul 11, 2024 at 01:02:25AM +0900, Fujii Masao wrote:
> On 2024/07/10 23:18, Nathan Bossart wrote:
>> 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?

After further research, I think you are right about that.

-- 
nathan



Commits

  1. Do not summarize WAL if generated with wal_level=minimal.

  2. Revert "Auto-tune effective_cache size to be 4x shared buffers"

  3. Un-break ecpg test suite under --disable-integer-datetimes.

  4. Again fix initialization of auto-tuned effective_cache_size.

  5. Code review for auto-tuned effective_cache_size.

  6. Auto-tune effective_cache size to be 4x shared buffers