aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2016-10-24 09:27:24 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2016-10-24 09:46:49 -0300
commitc8329f934e1bce2a47ca9127cb7cf704e070c278 (patch)
tree5d3e38a0e9bf95e212d5736e347296409aa34fdd /src/backend/access/transam/commit_ts.c
parent6beb8c75ceed610a8e5d416882aad75fe722249e (diff)
downloadpostgresql-c8329f934e1bce2a47ca9127cb7cf704e070c278.tar.gz
postgresql-c8329f934e1bce2a47ca9127cb7cf704e070c278.zip
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
Diffstat (limited to 'src/backend/access/transam/commit_ts.c')
-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 e330105217d..67c8bf3cd7d 100644
--- a/src/backend/access/transam/commit_ts.c
+++ b/src/backend/access/transam/commit_ts.c
@@ -843,6 +843,8 @@ SetCommitTsLimit(TransactionId oldestXact, TransactionId newestXact)
else
{
Assert(ShmemVariableCache->newestCommitTsXid == InvalidTransactionId);
+ ShmemVariableCache->oldestCommitTsXid = oldestXact;
+ ShmemVariableCache->newestCommitTsXid = newestXact;
}
LWLockRelease(CommitTsLock);
}