]> granicus.if.org Git - postgresql/commit
Fix walsender handling of postmaster shutdown, to not go into endless loop.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 8 Oct 2012 10:22:04 +0000 (13:22 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 8 Oct 2012 10:32:14 +0000 (13:32 +0300)
commit9c0e2b918252e753ea648dd6a7c18a054bed951b
tree83e912ba5c5c294921849c1196e76d879ec90cd4
parent95d035e66d8e4371d35830d81f39face03cd4c45
Fix walsender handling of postmaster shutdown, to not go into endless loop.

This bug was introduced by my patch to use the regular die/quickdie signal
handlers in walsender processes. I tried to make walsender exit at next
CHECK_FOR_INTERRUPTS() by setting ProcDiePending, but that's not enough, you
need to set InterruptPending too. On second thoght, it was not a very good
way to make walsender exit anyway, so use proc_exit(0) instead.

Also, send a CommandComplete message before exiting; that's what we did
before, and you get a nicer error message in the standby that way.

Reported by Thom Brown.
src/backend/replication/walsender.c