summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-07-29 10:33:15 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-07-29 11:58:01 +0300
commit1578d13dc76d8e40cb0ef04d525af406357bd57d (patch)
tree5bfeff79b7e57ea19024c39cb33b685f0354ce32 /src/include
parentaf9d51624e1147dd9773162a7680a532954ab2eb (diff)
Treat 2PC commit/abort the same as regular xacts in recovery.
There were several oversights in recovery code where COMMIT/ABORT PREPARED records were ignored: * pg_last_xact_replay_timestamp() (wasn't updated for 2PC commits) * recovery_min_apply_delay (2PC commits were applied immediately) * recovery_target_xid (recovery would not stop if the XID used 2PC) The first of those was reported by Sergiy Zuban in bug #11032, analyzed by Tom Lane and Andres Freund. The bug was always there, but was masked before commit d19bd29f07aef9e508ff047d128a4046cc8bc1e2, because COMMIT PREPARED always created an extra regular transaction that was WAL-logged. Backpatch to all supported versions (older versions didn't have all the features and therefore didn't have all of the above bugs).
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/xact.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 86dd6db777f..bd6962f11fc 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -177,8 +177,7 @@ typedef struct xl_xact_abort
/*
* COMMIT_PREPARED and ABORT_PREPARED are identical to COMMIT/ABORT records
* except that we have to store the XID of the prepared transaction explicitly
- * --- the XID in the record header will be for the transaction doing the
- * COMMIT PREPARED or ABORT PREPARED command.
+ * --- the XID in the record header will be invalid.
*/
typedef struct xl_xact_commit_prepared