Re: Incorrect checksum in control file with pg_rewind test
Ivan Kovmir <ivan.kovmir@cybertec.at>
From: Ivan Kovmir <ivan.kovmir@cybertec.at>
To: "Maksim.Melnikov" <m.melnikov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-11-14T13:15:10Z
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 →
-
Try to handle torn reads of pg_control in frontend.
- 5725e4ebe7a9 16.1 cited
I can reproduce the bug on the master branch with the following steps:
1. Apply 0001-XXX-Dirty-hack-to-clobber-control-file-for-testing.patch [1]
2. Compile PostgreSQL with `-DEXEC_BACKEND` C compiler flag option.
3. Run `initdb`
4. Run `postgres`
5. Run `pgbench -i`
6. Run `psql -c 'do $$ begin loop perform pg_update_control_file(); end
loop; end; $$;'`
7. Run `for run in {1..5000}; do pgbench -c50 -t100 -j6 -S postgres; done`
in parallel with the previous command.
8. Wait a while.
[1]
https://www.postgresql.org/message-id/CA%2BhUKGK-BEe38aKNqHJDQ86LUW-CMwF5F9bo1JtJVg71FoDv_w%40mail.gmail.com