Re: Incorrect checksum in control file with pg_rewind test - Mailing list pgsql-hackers

From Maksim.Melnikov
Subject Re: Incorrect checksum in control file with pg_rewind test
Date
Msg-id edff64df-da98-4d1d-a65a-6f5a8edf7d92@postgrespro.ru
Whole thread Raw
In response to Incorrect checksum in control file with pg_rewind test  ("Maksim.Melnikov" <m.melnikov@postgrespro.ru>)
List 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




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Reorganize GUC structs
Next
From: Heikki Linnakangas
Date:
Subject: Multixid SLRU truncation bugs at wraparound