Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check wakeup_flags from
wait_latch
function to exit on `WL_POSTMAST…
…ER_DEATH` (#1938) There are some cases when the `wait_latch` loop in background worker is not being interrupted after the postmaster was exited. It can be reproduced by running postgres directly using `/opt/homebrew/opt/postgresql@17/bin/postgres -D /opt/homebrew/var/postgresql@17` and after the background worker will be started you will need to send `SIGKILL` to the postmaster process. (the issue is not reproducible when managing postgres via `pg_ctl`, I have encountered this issue during local development as homebrew service runs postgres directly using `postgres` binary) Then you can see that the postgres will be exited, but background worker process will remain active. > Make sure the WL_POSTMASTER_DEATH flag is set when calling that function, and verify the return code for a prompt exit in the emergency case that postgres itself has terminated. (see #1938 for an example)
- Loading branch information