]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Handle checksumworker startup wait race
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Sun, 5 Apr 2026 23:55:06 +0000 (01:55 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Sun, 5 Apr 2026 23:55:06 +0000 (01:55 +0200)
commitd771b0a907e67dc929dbbdebf70ecb006081b629
treeaa7f6720009e10221e1d8d0069f37217c7349c02
parent557a9f1e3e62894cc3302eda72d9df091d72f37b
Handle checksumworker startup wait race

If the background worker for processing databases manages to finish
before the launcher starts waiting for it, the launcher would treat
it erroneously as an error.  Fix by ensureing to check result state
in this case.  Identified on CI and synthetically reproduced during
local testing.

Also while, make sure to properly lock the shared memory structure
before updating tje result state.

Author: Daniel Gustafsson <daniel@yesql.seA
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/4fxw37ge47v5baeozla5phymi233hxbcjbwwsfwv3mpg3kyl2z@6jk4nkf6jp4
src/backend/postmaster/datachecksum_state.c