Fix assertion failure with latch wait in single-user mode LatchWaitSetPostmasterDeathPos, the latch event position for the postmaster death event, is initialized under IsUnderPostmaster. WaitLatch() considered it as a valid wait target in single-user mode (!IsUnderPostmaster), which was incorrect.
One code path found to fail with an assertion failure is a database drop in single-user mode while waiting in WaitForProcSignalBarrier() after the drop. Oversight in commit 84e5b2f07a5e. Author: Patrick Stählin <m...@packi.ch> Co-authored-by: Ronan Dunklau <ronan.dunk...@aiven.io> Discussion: https://postgr.es/m/18996-3a2744c814048...@postgresql.org Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/641f20d4c433b66df2928408fb2b44bd165c2329 Modified Files -------------- src/backend/storage/ipc/latch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)