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 Banck <mbanck@gmx.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-11T07:57:13Z
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 →
  1. Use correct datatype for PID

  2. Improve comments in online checksums code

  3. Fix checksum state transition during promotion

  4. Fix regex searching for page verification failures in tests

  5. Apply data-checksum worker throttling parameters

  6. Skip WAL for unlogged main fork during online checksum enable

  7. Revert "Get rid of WALBufMappingLock"

  8. Get rid of WALBufMappingLock

  9. Improve grammar of options for command arrays in TAP tests

Attachments

> On 9 Oct 2024, at 12:41, Tomas Vondra <tomas@vondra.me> wrote:

>>> should use PG_DATA_CHECKSUM_INPROGRESS_ON_VERSION instead of the magic
>>> constant? For "off" we use "0" which seems somewhat acceptable, but for
>>> other values it's less obvious what the meaning is.
>> 
>> It doesn't seem clean to include storage/bufpage.h in pg_upgrade, I wonder if
>> we should move (or mirror) the checksum versions to storage/checksum_impl.h to
>> make them available to frontend and backend tools?
> 
> +1 to have checksum_impl.h

I tried various different ways of breaking out the checksum version into
another header file but all of them ended up messier than the current state due
to how various tools include the checksum code.  In the end I opted for doing
the bufpage include to keep it simple.  This patch is big enough as it is
without additional refactoring of checksum (header) code, that can be done
separately from this.

> I ran the tests with this new patch, and I haven't reproduced the
> crashes. I'll let it run a bit longer, and improve it to test some more
> stuff, but it looks good.

Thanks for testing, I am too unable to reproduce that error.

The attached v5 has the above include fix as well as pgindent and pgperltidy
runs and some tweaking to the commit message to make it concise. It's also
rebased to handle a recent conflict in the makefiles.

--
Daniel Gustafsson