aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2010-01-23 16:37:12 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2010-01-23 16:37:12 +0000
commit959ac58c04130d467fb05e63a3ceb8e2ded404c7 (patch)
tree314eeeea7c6c8afa7cbe35bfe5ecde04eff35f71 /src/backend/access/transam/xlog.c
parent4fa69e566cf1b836ae8aa9bee24ab0c556cfe94e (diff)
downloadpostgresql-959ac58c04130d467fb05e63a3ceb8e2ded404c7.tar.gz
postgresql-959ac58c04130d467fb05e63a3ceb8e2ded404c7.zip
In HS, Startup process sets SIGALRM when waiting for buffer pin. If
woken by alarm we send SIGUSR1 to all backends requesting that they check to see if they are blocking Startup process. If so, they throw ERROR/FATAL as for other conflict resolutions. Deadlock stop gap removed. max_standby_delay = -1 option removed to prevent deadlock.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index a7ff66a6b86..004ea0a46bf 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.359 2010/01/20 19:43:40 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.360 2010/01/23 16:37:12 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
@@ -8803,9 +8803,12 @@ StartupProcessMain(void)
*/
pqsignal(SIGHUP, StartupProcSigHupHandler); /* reload config file */
pqsignal(SIGINT, SIG_IGN); /* ignore query cancel */
- pqsignal(SIGTERM, StartupProcShutdownHandler); /* request shutdown */
- pqsignal(SIGQUIT, startupproc_quickdie); /* hard crash time */
- pqsignal(SIGALRM, SIG_IGN);
+ pqsignal(SIGTERM, StartupProcShutdownHandler); /* request shutdown */
+ pqsignal(SIGQUIT, startupproc_quickdie); /* hard crash time */
+ if (XLogRequestRecoveryConnections)
+ pqsignal(SIGALRM, handle_standby_sig_alarm); /* ignored unless InHotStandby */
+ else
+ pqsignal(SIGALRM, SIG_IGN);
pqsignal(SIGPIPE, SIG_IGN);
pqsignal(SIGUSR1, SIG_IGN);
pqsignal(SIGUSR2, SIG_IGN);