From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Tomas Vondra <tomas(at)vondra(dot)me> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Michael Banck <mbanck(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Changing the state of data checksums in a running cluster |
Date: | 2025-03-14 14:06:52 |
Message-ID: | 442AB85E-028E-419E-A330-40F7D3445871@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 14 Mar 2025, at 14:38, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>> On 14 Mar 2025, at 13:20, Tomas Vondra <tomas(at)vondra(dot)me> wrote:
>> This is "ephemeral" in the sense that setting the value to "on" again
>> would be harmless, and indeed a non-assert build will run just fine.
>
> As mentioned off-list, being able to loosen the restriction for the first
> barrier seen seem like a good way to keep this assertion. Removing it is of
> course the alternative solution, as it's not causing any issues, but given how
> handy it's been to find actual issues it would be good to be able to keep it.
>
>> i.e. to first register into procsignal, and then read the new value.
>> AFAICS this guarantees we won't lose any checksum version updates. It
>> does mean we still can get a barrier for a value we've already seen, but
>> I think we should simply ignore this for the very first update.
>
> Calling functions with sideeffects in setting state seems like a bad idea
> before ProcSignalInit has run, that's thinko on my part in this patch. Your
> solution of reordering seems like the right way to handle this.
0006 in the attached version is what I have used when testing the above, along
with an update to the copyright year which I had missed doing earlier. It also
contains the fix in LocalProcessControlFile which I had in my local tree, I
think we need something like that at least.
--
Daniel Gustafsson
Attachment | Content-Type | Size |
---|---|---|
v20250314-0006-Reviewfixups.patch | application/octet-stream | 4.6 KB |
v20250314-0005-data_checksum_version-reworks.patch | application/octet-stream | 12.3 KB |
v20250314-0004-perltidy.patch | application/octet-stream | 1.8 KB |
v20250314-0003-pgindent.patch | application/octet-stream | 1.9 KB |
v20250314-0002-review-fixes.patch | application/octet-stream | 6.5 KB |
v20250314-0001-Online-enabling-and-disabling-of-data-chec.patch | application/octet-stream | 145.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Aleksander Alekseev | 2025-03-14 14:09:50 | Re: Proposal: manipulating pg_control file from Perl |
Previous Message | Christoph Berg | 2025-03-14 13:57:34 | Re: Proposal: manipulating pg_control file from Perl |