From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix walsender handling of postmaster shutdown, to not go into en |
Date: | 2012-10-08 10:32:41 |
Message-ID: | E1TLAdd-0003nX-5e@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/9c0e2b918252e753ea648dd6a7c18a054bed951b
Modified Files
--------------
src/backend/replication/walsender.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2012-10-08 10:34:07 | Re: pgsql: Use the regular main processing loop also in walsenders. |
Previous Message | Tom Lane | 2012-10-08 01:53:06 | pgsql: Autoconfiscate selection of 64-bit int type for 64-bit large obj |