diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2010-01-16 10:05:59 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2010-01-16 10:05:59 +0000 |
commit | a8ce974cddef3957b0615d743a1d090d12e81d50 (patch) | |
tree | 1a7b80c1def4f5719a2d9a223b47e639dcbcb504 /src/include/storage/procarray.h | |
parent | c9dc53be77664952ebd3b50a1e920e92306484de (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/storage/procarray.h')
-rw-r--r-- | src/include/storage/procarray.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/storage/procarray.h b/src/include/storage/procarray.h index 4572f489af8..42953b0843c 100644 --- a/src/include/storage/procarray.h +++ b/src/include/storage/procarray.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/storage/procarray.h,v 1.29 2010/01/10 15:44:28 sriggs Exp $ + * $PostgreSQL: pgsql/src/include/storage/procarray.h,v 1.30 2010/01/16 10:05:56 sriggs Exp $ * *------------------------------------------------------------------------- */ @@ -15,6 +15,7 @@ #define PROCARRAY_H #include "storage/lock.h" +#include "storage/procsignal.h" #include "storage/standby.h" #include "utils/snapshot.h" @@ -58,8 +59,7 @@ extern VirtualTransactionId *GetCurrentVirtualXIDs(TransactionId limitXmin, int *nvxids); extern VirtualTransactionId *GetConflictingVirtualXIDs(TransactionId limitXmin, Oid dbOid, bool skipExistingConflicts); -extern pid_t CancelVirtualTransaction(VirtualTransactionId vxid, - int cancel_mode); +extern pid_t CancelVirtualTransaction(VirtualTransactionId vxid, ProcSignalReason sigmode); extern int CountActiveBackends(void); extern int CountDBBackends(Oid databaseid); |