summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/twophase.c
diff options
context:
space:
mode:
authorBruce Momjian2015-05-24 01:35:49 +0000
committerBruce Momjian2015-05-24 01:35:49 +0000
commit807b9e0dff663c5da875af7907a5106c0ff90673 (patch)
tree89a0cfbd3c9801dcb04aae4ccf2fee935092f958 /src/backend/access/transam/twophase.c
parent225892552bd3052982d2b97b749e5945ea71facc (diff)
pgindent run for 9.5
Diffstat (limited to 'src/backend/access/transam/twophase.c')
-rw-r--r--src/backend/access/transam/twophase.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 4743cacefe6..177d1e1432e 100644
--- a/src/backend/access/transam/twophase.c
+++ b/src/backend/access/transam/twophase.c
@@ -117,7 +117,7 @@ typedef struct GlobalTransactionData
TimestampTz prepared_at; /* time of preparation */
XLogRecPtr prepare_lsn; /* XLOG offset of prepare record */
Oid owner; /* ID of user that executed the xact */
- BackendId locking_backend; /* backend currently working on the xact */
+ BackendId locking_backend; /* backend currently working on the xact */
bool valid; /* TRUE if PGPROC entry is in proc array */
char gid[GIDSIZE]; /* The GID assigned to the prepared xact */
} GlobalTransactionData;
@@ -256,24 +256,24 @@ AtAbort_Twophase(void)
return;
/*
- * What to do with the locked global transaction entry? If we were in
- * the process of preparing the transaction, but haven't written the WAL
+ * What to do with the locked global transaction entry? If we were in the
+ * process of preparing the transaction, but haven't written the WAL
* record and state file yet, the transaction must not be considered as
* prepared. Likewise, if we are in the process of finishing an
- * already-prepared transaction, and fail after having already written
- * the 2nd phase commit or rollback record to the WAL, the transaction
- * should not be considered as prepared anymore. In those cases, just
- * remove the entry from shared memory.
+ * already-prepared transaction, and fail after having already written the
+ * 2nd phase commit or rollback record to the WAL, the transaction should
+ * not be considered as prepared anymore. In those cases, just remove the
+ * entry from shared memory.
*
- * Otherwise, the entry must be left in place so that the transaction
- * can be finished later, so just unlock it.
+ * Otherwise, the entry must be left in place so that the transaction can
+ * be finished later, so just unlock it.
*
* If we abort during prepare, after having written the WAL record, we
* might not have transferred all locks and other state to the prepared
* transaction yet. Likewise, if we abort during commit or rollback,
- * after having written the WAL record, we might not have released
- * all the resources held by the transaction yet. In those cases, the
- * in-memory state can be wrong, but it's too late to back out.
+ * after having written the WAL record, we might not have released all the
+ * resources held by the transaction yet. In those cases, the in-memory
+ * state can be wrong, but it's too late to back out.
*/
if (!MyLockedGxact->valid)
{
@@ -408,8 +408,8 @@ MarkAsPreparing(TransactionId xid, const char *gid,
TwoPhaseState->prepXacts[TwoPhaseState->numPrepXacts++] = gxact;
/*
- * Remember that we have this GlobalTransaction entry locked for us.
- * If we abort after this, we must release it.
+ * Remember that we have this GlobalTransaction entry locked for us. If we
+ * abort after this, we must release it.
*/
MyLockedGxact = gxact;
@@ -499,8 +499,8 @@ LockGXact(const char *gid, Oid user)
if (gxact->locking_backend != InvalidBackendId)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("prepared transaction with identifier \"%s\" is busy",
- gid)));
+ errmsg("prepared transaction with identifier \"%s\" is busy",
+ gid)));
if (user != gxact->owner && !superuser_arg(user))
ereport(ERROR,
@@ -1423,8 +1423,8 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
/*
* In case we fail while running the callbacks, mark the gxact invalid so
- * no one else will try to commit/rollback, and so it will be recycled
- * if we fail after this point. It is still locked by our backend so it
+ * no one else will try to commit/rollback, and so it will be recycled if
+ * we fail after this point. It is still locked by our backend so it
* won't go away yet.
*
* (We assume it's safe to do this without taking TwoPhaseStateLock.)
@@ -2055,8 +2055,9 @@ RecoverPreparedTransactions(void)
StandbyReleaseLockTree(xid, hdr->nsubxacts, subxids);
/*
- * We're done with recovering this transaction. Clear MyLockedGxact,
- * like we do in PrepareTransaction() during normal operation.
+ * We're done with recovering this transaction. Clear
+ * MyLockedGxact, like we do in PrepareTransaction() during normal
+ * operation.
*/
PostPrepare_Twophase();