Hi, REPACK (CONCURRENTLY) starts a decoding bgworker and then waits in start_repack_decoding_worker() for the worker to set a shared-memory flag. The wait has no liveness check on the worker itself. If the worker never reaches that point (e.g., fork failure under memory pressure, or when BecomeLockGroupMember() returns false, or early exit before the shm_mq error redirect is set up), the backend waits indefinitely with no way out other than cancellation. 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
