Race between datachecksum enablement and create table with the file_copy strategy

Started by Zsolt Parragi5 days ago3 messagesbugs
Jump to latest
#1Zsolt Parragi
zsolt.parragi@percona.com

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
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Zsolt Parragi (#1)
Re: Race between datachecksum enablement and create table with the file_copy strategy

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

#3Daniel Gustafsson
daniel@yesql.se
In reply to: Daniel Gustafsson (#2)
Re: Race between datachecksum enablement and create table with the file_copy strategy

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