postgresql/src/backend/commands
Tom Lane d20eec82a0 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:19 -05:00
..
aggregatecmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
alter.c Fix ALTER EXTENSION / SET SCHEMA 2012-10-31 10:48:41 -03:00
analyze.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
async.c Add HOLD/RESUME_INTERRUPTS in HandleCatchupInterrupt/HandleNotifyInterrupt. 2013-12-13 14:05:19 -05:00
cluster.c Fix assorted bugs in CREATE/DROP INDEX CONCURRENTLY. 2012-11-29 10:37:13 -05:00
collationcmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
comment.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
constraint.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
conversioncmds.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
copy.c Fix subtly-wrong volatility checking in BeginCopyFrom(). 2013-11-08 08:59:49 -05:00
createas.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
dbcommands.c Protect against SnapshotNow race conditions in pg_tablespace scans. 2013-01-18 18:06:27 -05:00
define.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
discard.c Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
dropcmds.c Don't trash input list structure in does_not_exist_skipping(). 2012-11-08 11:34:37 -05:00
explain.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
extension.c Provide better message when CREATE EXTENSION can't find a target schema. 2013-06-04 17:22:43 -04:00
foreigncmds.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
functioncmds.c Improve reporting of permission errors for array types 2012-06-15 23:03:50 +03:00
indexcmds.c Restore REINDEX constraint validation. 2013-07-30 18:39:34 -04:00
lockcmds.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
Makefile Restructure SELECT INTO's parsetree representation into CreateTableAsStmt. 2012-03-19 21:38:12 -04:00
opclasscmds.c Improve reporting of permission errors for array types 2012-06-15 23:03:50 +03:00
operatorcmds.c Improve reporting of permission errors for array types 2012-06-15 23:03:50 +03:00
portalcmds.c Only install a portal's ResourceOwner if it actually has one. 2013-06-13 13:11:35 -04:00
prepare.c Revert patch for taking fewer snapshots. 2012-11-26 15:55:51 -05:00
proclang.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
schemacmds.c Fix some issues with temp/transient tables in extension scripts. 2012-03-08 15:53:09 -05:00
seclabel.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
sequence.c Fix failure to ignore leftover temp tables after a server crash. 2012-12-17 20:15:39 -05:00
tablecmds.c Fix failure to ignore leftover temp tables after a server crash. 2012-12-17 20:15:39 -05:00
tablespace.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
trigger.c Add missing buffer lock acquisition in GetTupleForTrigger(). 2012-11-30 13:56:00 -05:00
tsearchcmds.c Extend object access hook framework to support arguments, and DROP. 2012-03-09 14:34:56 -05:00
typecmds.c Fix ALTER EXTENSION / SET SCHEMA 2012-10-31 10:48:41 -03:00
user.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
vacuum.c Fix typo in freeze_table_age implementation 2013-02-01 12:10:10 -03:00
vacuumlazy.c Don't update relfrozenxid if any pages were skipped. 2013-11-27 13:28:47 +02:00
variable.c Fix some odd behaviors when using a SQL-style simple GMT offset timezone. 2013-11-01 12:13:26 -04:00
view.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00