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

Jelte Fennema-Nio <postgres@jeltef.nl>

From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-07-10T14:29:14Z
Lists: pgsql-hackers
On Wed, 10 Jul 2024 at 16:18, Nathan Bossart <nathandbossart@gmail.com> 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'

I think that issue can be solved fairly easily by making the guc
check_hook always pass during postmaster startup (by e.g. checking
pmState), and relying on the previous startup check instead during
startup.



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