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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d771b0a907e67dc929dbbdebf70ecb006081b629
Modified Files
--------------
src/backend/postmaster/datachecksum_state.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)