Re: Incorrect checksum in control file with pg_rewind test

From: "Maksim(dot)Melnikov" <m(dot)melnikov(at)postgrespro(dot)ru>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Incorrect checksum in control file with pg_rewind test
Date: 2025-11-07 15:19:39
Message-ID: edff64df-da98-4d1d-a65a-6f5a8edf7d92@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
just to clarify, it isn't pg_rewind related issue and can fire
spontaneously.
I don't have any strong scenario how to reproduce it, tests sometimes
fired on our local CI, but as you can see on thread [1],
where the same issue for frontends was discussed, it is very hard to
reproduce and there wasn't scenario how to do it too.

Some dirty hacks to reproduce it was described here [2], and I've tried
it on master branch:
First of all I applied patch
0001-XXX-Dirty-hack-to-clobber-control-file-for-testing.patch from [2],
then compile app with
-DEXEC_BACKEND and exec command in psql
do $$ begin loop perform pg_update_control_file(); end loop; end; $$;
Also I've run pgbench command
for run in {1..5000}; do pgbench -c50 -t100 -j6 -S postgres ; done
And eventually got error

2025-11-07 17:58:33.139 MSK [2472504] FATAL:  incorrect checksum in
control file
2025-11-07 17:58:33.141 MSK [2472501] LOG:  could not receive data from
client: Connection reset by peer
2025-11-07 17:58:33.143 MSK [2472505] LOG:  could not send data to
client: Broken pipe
2025-11-07 17:58:33.143 MSK [2472505] FATAL:  connection to client lost

Best regards,
Maksim Melnikov

[1]
https://www.postgresql.org/message-id/flat/20221123014224.xisi44byq3cf5psi%40awork3.anarazel.de
[2]
https://www.postgresql.org/message-id/CA%2BhUKGK-BEe38aKNqHJDQ86LUW-CMwF5F9bo1JtJVg71FoDv_w%40mail.gmail.com
[3]
https://www.postgresql.org/message-id/f59335a4-83ff-438a-a30e-7cf2200276b6%40postgrespro.ru

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2025-11-07 15:33:09 Multixid SLRU truncation bugs at wraparound
Previous Message Tom Lane 2025-11-07 15:14:55 Re: Reorganize GUC structs