summaryrefslogtreecommitdiff
path: root/src/include/tcop/tcopprot.h
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2010-01-16 10:05:59 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2010-01-16 10:05:59 +0000
commita8ce974cddef3957b0615d743a1d090d12e81d50 (patch)
tree1a7b80c1def4f5719a2d9a223b47e639dcbcb504 /src/include/tcop/tcopprot.h
parentc9dc53be77664952ebd3b50a1e920e92306484de (diff)
Teach standby conflict resolution to use SIGUSR1
Conflict reason is passed through directly to the backend, so we can take decisions about the effect of the conflict based upon the local state. No specific changes, as yet, though this prepares for later work. CancelVirtualTransaction() sends signals while holding ProcArrayLock. Introduce errdetail_abort() to give message detail explaining that the abort was caused by conflict processing. Remove CONFLICT_MODE states in favour of using PROCSIG_RECOVERY_CONFLICT states directly, for clarity.
Diffstat (limited to 'src/include/tcop/tcopprot.h')
-rw-r--r--src/include/tcop/tcopprot.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h
index 891979dc8a2..b46160160ea 100644
--- a/src/include/tcop/tcopprot.h
+++ b/src/include/tcop/tcopprot.h
@@ -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/include/tcop/tcopprot.h,v 1.102 2010/01/02 16:58:09 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/tcop/tcopprot.h,v 1.103 2010/01/16 10:05:59 sriggs Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
@@ -21,6 +21,7 @@
#include "executor/execdesc.h"
#include "nodes/parsenodes.h"
+#include "storage/procsignal.h"
#include "utils/guc.h"
@@ -64,6 +65,7 @@ extern void die(SIGNAL_ARGS);
extern void quickdie(SIGNAL_ARGS);
extern void StatementCancelHandler(SIGNAL_ARGS);
extern void FloatExceptionHandler(SIGNAL_ARGS);
+extern void RecoveryConflictInterrupt(ProcSignalReason reason); /* called from SIGUSR1 handler */
extern void prepare_for_client_read(void);
extern void client_read_ended(void);
extern const char *process_postgres_switches(int argc, char *argv[],