Re: Changing the state of data checksums in a running cluster
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Tomas Vondra <tomas@vondra.me>
Cc: Michael Paquier <michael@paquier.xyz>,
Michael Banck <mbanck@gmx.net>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-03-14T14:06:52Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use correct datatype for PID
- 0ca1b3010597 19 (unreleased) landed
-
Improve comments in online checksums code
- cd857dec0e0a 19 (unreleased) landed
-
Fix checksum state transition during promotion
- 5fee7cab1b87 19 (unreleased) landed
-
Fix regex searching for page verification failures in tests
- 486b9a9b9eb4 19 (unreleased) landed
-
Apply data-checksum worker throttling parameters
- 9a39056c418c 19 (unreleased) landed
-
Skip WAL for unlogged main fork during online checksum enable
- 2018bd616790 19 (unreleased) landed
-
Revert "Get rid of WALBufMappingLock"
- c13070a27b63 19 (unreleased) cited
-
Get rid of WALBufMappingLock
- bc22dc0e0ddc 18.0 cited
-
Improve grammar of options for command arrays in TAP tests
- ce1b0f9da03e 18.0 cited
Attachments
- v20250314-0006-Reviewfixups.patch (application/octet-stream) patch v20250314-0006
- v20250314-0005-data_checksum_version-reworks.patch (application/octet-stream) patch v20250314-0005
- v20250314-0004-perltidy.patch (application/octet-stream) patch v20250314-0004
- v20250314-0003-pgindent.patch (application/octet-stream) patch v20250314-0003
- v20250314-0002-review-fixes.patch (application/octet-stream) patch v20250314-0002
- v20250314-0001-Online-enabling-and-disabling-of-data-chec.patch (application/octet-stream) patch v20250314-0001
> On 14 Mar 2025, at 14:38, Daniel Gustafsson <daniel@yesql.se> wrote: >> On 14 Mar 2025, at 13:20, Tomas Vondra <tomas@vondra.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