summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2016-10-24 12:27:24 +0000
committerAlvaro Herrera2016-10-24 12:38:28 +0000
commit7a2fa5774a52bf7469f622e3ed4d6317c1d5a64e (patch)
treee6f9363df785b711f0f0daa762e251c0d64c484a
parentce9bae2261de6ad10a14dd02c63bdd31a5b23307 (diff)
Preserve commit timestamps across clean restart
An oversight in setting the boundaries of known commit timestamps during startup caused old commit timestamps to become inaccessible after a server restart. Author and reporter: Julien Rouhaud Review, test code: Craig Ringer
-rw-r--r--src/backend/access/transam/commit_ts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c
index a284894862b..38dba8cef41 100644
--- a/src/backend/access/transam/commit_ts.c
+++ b/src/backend/access/transam/commit_ts.c
@@ -842,6 +842,8 @@ SetCommitTsLimit(TransactionId oldestXact, TransactionId newestXact)
else
{
Assert(ShmemVariableCache->newestCommitTsXid == InvalidTransactionId);
+ ShmemVariableCache->oldestCommitTsXid = oldestXact;
+ ShmemVariableCache->newestCommitTsXid = newestXact;
}
LWLockRelease(CommitTsLock);
}