Hi, pg_enable_data_checksums() and pg_disable_data_checksums() start a launcher background worker via StartDataChecksumsWorkerLauncher() and then return immediately. The function errors out if registration fails, but it does not check whether the launcher actually started after that. If the postmaster registers the launcher but then fails to fork it (e.g., fork failure under memory pressure), the SQL function still returns success, the launcher never runs. The caller gets no indication that the requested operation did not happen. I reproduced this with an induced fork failure, so I think we need to tighten this for both PG19 and HEAD branches.
Fix would be to check GetBackgroundWorkerPid()/WaitForBackgroundWorkerStartup() and error out when the worker has not started. If okay, I can send a patch. Thoughts? -- Bharath Rupireddy Amazon Web Services: https://aws.amazon.com
