postgresql/src
Tom Lane 2efc6dc256 Add HOLD/RESUME_INTERRUPTS in HandleCatchupInterrupt/HandleNotifyInterrupt.
This prevents a possible longjmp out of the signal handler if a timeout
or SIGINT occurs while something within the handler has transiently set
ImmediateInterruptOK.  For safety we must hold off the timeout or cancel
error until we're back in mainline, or at least till we reach the end of
the signal handler when ImmediateInterruptOK was true at entry.  This
syncs these functions with the logic now present in handle_sig_alarm.

AFAICT there is no live bug here in 9.0 and up, because I don't think we
currently can wait for any heavyweight lock inside these functions, and
there is no other code (except read-from-client) that will turn on
ImmediateInterruptOK.  However, that was not true pre-9.0: in older
branches ProcessIncomingNotify might block trying to lock pg_listener, and
then a SIGINT could lead to undesirable control flow.  It might be all
right anyway given the relatively narrow code ranges in which NOTIFY
interrupts are enabled, but for safety's sake I'm back-patching this.
2013-12-13 14:05:51 -05:00
..
backend Add HOLD/RESUME_INTERRUPTS in HandleCatchupInterrupt/HandleNotifyInterrupt. 2013-12-13 14:05:51 -05:00
bin Add GUC to enable WAL-logging of hint bits, even with checksums disabled. 2013-12-13 16:26:14 +02:00
common Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
include Add GUC to enable WAL-logging of hint bits, even with checksums disabled. 2013-12-13 16:26:14 +02:00
interfaces C comment: again update comment for pg_fe_sendauth for error cases 2013-12-03 11:42:18 -05:00
makefiles Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
pl Fix more instances of "the the" in comments. 2013-12-13 20:02:01 +02:00
port Remove use of obsolescent Autoconf macros 2013-11-30 09:17:08 -05:00
template Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
test Improve EXPLAIN to print the grouping columns in Agg and Group nodes. 2013-12-12 11:24:38 -05:00
timezone Update time zone data files to tzdata release 2013h. 2013-12-01 14:11:44 -05:00
tools Add new wal_level, logical, sufficient for logical decoding. 2013-12-10 19:01:40 -05:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in build: pass EXTRA_REGRESS_OPTS to secondary regression tests 2013-12-04 10:14:45 -05:00
Makefile.shlib Remove IRIX port. 2013-10-18 08:14:21 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00