aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/commit_ts.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-09-29 14:40:56 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-09-29 14:40:56 -0300
commit6b61955135e94b39d85571fdbb0c5a749af767f1 (patch)
treeedf10d08cad9655c02bb3dc2e5ed5bcc53be8831 /src/include/access/commit_ts.h
parentb631a46ed83b7eebf5cde16b41d842596cbcc69d (diff)
downloadpostgresql-6b61955135e94b39d85571fdbb0c5a749af767f1.tar.gz
postgresql-6b61955135e94b39d85571fdbb0c5a749af767f1.zip
Code review for transaction commit timestamps
There are three main changes here: 1. No longer cause a start failure in a standby if the feature is disabled in postgresql.conf but enabled in the master. This reverts one part of commit 4f3924d9cd43; what we keep is the ability of the standby to activate/deactivate the module (which includes creating and removing segments as appropriate) during replay of such actions in the master. 2. Replay WAL records affecting commitTS even if the feature is disabled. This means the standby will always have the same state as the master after replay. 3. Have COMMIT PREPARE record the transaction commit time as well. We were previously only applying it in the normal transaction commit path. Author: Petr JelĂ­nek Discussion: http://www.postgresql.org/message-id/CAHGQGwHereDzzzmfxEBYcVQu3oZv6vZcgu1TPeERWbDc+gQ06g@mail.gmail.com Discussion: http://www.postgresql.org/message-id/CAHGQGwFuzfO4JscM9LCAmCDCxp_MfLvN4QdB+xWsS-FijbjTYQ@mail.gmail.com Additionally, I cleaned up nearby code related to replication origins, which I found a bit hard to follow, and fixed a couple of typos. Backpatch to 9.5, where this code was introduced. Per bug reports from Fujii Masao and subsequent discussion.
Diffstat (limited to 'src/include/access/commit_ts.h')
-rw-r--r--src/include/access/commit_ts.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h
index bd05ab4d5ce..dc865d1bc3d 100644
--- a/src/include/access/commit_ts.h
+++ b/src/include/access/commit_ts.h
@@ -24,7 +24,8 @@ extern bool check_track_commit_timestamp(bool *newval, void **extra,
extern void TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids,
TransactionId *subxids, TimestampTz timestamp,
- RepOriginId nodeid, bool do_xlog);
+ RepOriginId nodeid,
+ bool replaying_xlog, bool write_xlog);
extern bool TransactionIdGetCommitTsData(TransactionId xid,
TimestampTz *ts, RepOriginId *nodeid);
extern TransactionId GetLatestCommitTsData(TimestampTz *ts,
@@ -67,4 +68,4 @@ extern void commit_ts_redo(XLogReaderState *record);
extern void commit_ts_desc(StringInfo buf, XLogReaderState *record);
extern const char *commit_ts_identify(uint8 info);
-#endif /* COMMITTS_H */
+#endif /* COMMIT_TS_H */