Race between datachecksum enablement and create table with the file_copy strategy
Hello
There's a small race window between enabling data checksums and
creating a new database with the file_copy strategy:
Create database checks for in progress data checksums before it
inserts a new row into pg_database. If the data checksum worker starts
in that window, it can miss the new database completely and skip
generating its checksums.
See the attached patch and test case using a new injection point.
Attachments:
0001-createdb-recheck-checksum-state-before-file_copy.patchapplication/octet-stream; name=0001-createdb-recheck-checksum-state-before-file_copy.patchDownload+100-1
On 21 Jul 2026, at 12:55, Zsolt Parragi <zsolt.parragi@percona.com> wrote:
There's a small race window between enabling data checksums and
creating a new database with the file_copy strategy:Create database checks for in progress data checksums before it
inserts a new row into pg_database. If the data checksum worker starts
in that window, it can miss the new database completely and skip
generating its checksums.
Thanks for the report and patch, I am currently out of the office but will check and apply on Sunday or Monday when back home.
./daniel
On 21 Jul 2026, at 20:36, Daniel Gustafsson <daniel@yesql.se>
.. will check and apply on Sunday or Monday when back home.
Unless beaten to it of course, if any other committer want to pick it up then feel free of course.
./daniel