summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael P2011-07-25 00:35:24 +0000
committerMichael P2011-07-25 00:35:24 +0000
commitf0f8a4b0680532a89c364c2294d3ca3a07ef7fea (patch)
treebe07d33f63b62446aa1484d33b299ef6ed865d3e /src
parent19d1d645290457d8ec8c3ec0e4ff1fcc78b43377 (diff)
Addition of forgotten PGXC flags in xact.c
This made the code inconsistent with Postgres 9.1. Report and patch by sch19831106
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xact.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 941f6aa312..1a199789b1 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -65,6 +65,7 @@
#include "utils/snapmgr.h"
#include "pg_trace.h"
+
/*
* User-tweakable parameters
*/
@@ -126,6 +127,7 @@ typedef enum TBlockState
TBLOCK_ABORT_END, /* failed xact, ROLLBACK received */
TBLOCK_ABORT_PENDING, /* live xact, ROLLBACK received */
TBLOCK_PREPARE, /* live xact, PREPARE received */
+
/* subtransaction states */
TBLOCK_SUBBEGIN, /* starting a subtransaction */
TBLOCK_SUBINPROGRESS, /* live subtransaction */
@@ -302,7 +304,11 @@ static void CallSubXactCallbacks(SubXactEvent event,
SubTransactionId mySubid,
SubTransactionId parentSubid);
static void CleanupTransaction(void);
+#ifdef PGXC
static void CommitTransaction(bool contact_gtm);
+#else
+static void CommitTransaction(void);
+#endif
static TransactionId RecordTransactionAbort(bool isSubXact);
static void StartTransaction(void);
@@ -468,7 +474,6 @@ GetCurrentTransactionId(void)
return s->transactionId;
}
-
/*
* GetCurrentTransactionIdIfAny
*
@@ -737,7 +742,6 @@ GetCurrentTransactionStopTimestamp(void)
#else
if (xactStopTimestamp != 0)
return xactStopTimestamp;
-
return GetCurrentTimestamp();
#endif
}
@@ -2036,8 +2040,10 @@ CommitTransaction(bool contact_gtm)
*/
if (!PreCommit_Portals(false))
break;
+#ifdef PGXC
else
IsHoldableCursor = true;
+#endif
}
/*
@@ -3067,6 +3073,8 @@ CommitTransactionCommand(void)
Assert(s->parent == NULL);
#ifdef PGXC
PrepareTransaction(false);
+#else
+ PrepareTransaction();
#endif
s->blockState = TBLOCK_DEFAULT;
}
@@ -4211,6 +4219,7 @@ BeginInternalSubTransaction(char *name)
if (name)
s->name = MemoryContextStrdup(TopTransactionContext, name);
break;
+
/* These cases are invalid. */
case TBLOCK_DEFAULT:
case TBLOCK_BEGIN: