]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Preserve commit timestamps across clean restart
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 24 Oct 2016 12:27:24 +0000 (09:27 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 24 Oct 2016 12:38:28 +0000 (09:38 -0300)
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

src/backend/access/transam/commit_ts.c

index a284894862b932e2736c72ab36a6d722189c187f..38dba8cef410dbdf13406bcd6ceac3a8163c7315 100644 (file)
@@ -842,6 +842,8 @@ SetCommitTsLimit(TransactionId oldestXact, TransactionId newestXact)
        else
        {
                Assert(ShmemVariableCache->newestCommitTsXid == InvalidTransactionId);
+               ShmemVariableCache->oldestCommitTsXid = oldestXact;
+               ShmemVariableCache->newestCommitTsXid = newestXact;
        }
        LWLockRelease(CommitTsLock);
 }