From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
Date: Thu, 11 Jul 2024 01:02:25 +0900
Message-ID: <523cc094-0fe1-4e2c-9653-a3cf9cde0c49@oss.nttdata.com> (raw)
In-Reply-To: <Zo6YPuvTmRW3b1s7@nathan>
References: <6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com>
<ZoVgXuYWbzTLXyRY@nathan>
<802ff3d5-fdc7-4b08-9046-2e9fc5fdae0e@oss.nttdata.com>
<CA+TgmoYPNfgAT3OubjoYSiXTb3-urOjQxT3SCEUCrRBx5g6ihA@mail.gmail.com>
<CA+TgmoY8DnzWNK_xu4=NTYdxGBGnFucrEpOALnS0awMp-s_pKQ@mail.gmail.com>
<7c1b48d8-0f08-4733-a4e6-d55f04581db7@oss.nttdata.com>
<CA+TgmoansG0B8ayQGw9Ozee6Jawz=HFUACpO_4gp-+SFJBxiYw@mail.gmail.com>
<Zo6YPuvTmRW3b1s7@nathan>
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...
>> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: masao.fujii@oss.nttdata.com, nathandbossart@gmail.com, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
In-Reply-To: <523cc094-0fe1-4e2c-9653-a3cf9cde0c49@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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