]> granicus.if.org Git - postgresql/commitdiff
Remove incorrect assertion in clog.c
authorRobert Haas <rhaas@postgresql.org>
Thu, 10 Aug 2017 15:20:57 +0000 (11:20 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 10 Aug 2017 15:20:57 +0000 (11:20 -0400)
We must advance the oldest XID that can be safely looked up in clog
*before* truncating CLOG, and the oldest XID that can't be reused
*after* truncating CLOG.  This assertion, and the accompanying
comment, are confused; remove them.

Reported by Neha Sharma.

Discussion: http://postgr.es/m/CANiYTQumC3T=UMBMd1Hor=5XWZYuCEQBioL3ug0YtNQCMMT5wQ@mail.gmail.com

src/backend/access/transam/clog.c

index c34e7e1945f869cb637fbf10f560791cda9686d4..0a7e2b310f1fbcf9e675ddb55e7fd88cecf03b85 100644 (file)
@@ -678,10 +678,6 @@ TruncateCLOG(TransactionId oldestXact, Oid oldestxid_datoid)
         */
        AdvanceOldestClogXid(oldestXact);
 
-       /* vac_truncate_clog already advanced oldestXid */
-       Assert(TransactionIdPrecedesOrEquals(oldestXact,
-                                                                                ShmemVariableCache->oldestXid));
-
        /*
         * Write XLOG record and flush XLOG to disk. We record the oldest xid
         * we're keeping information about here so we can ensure that it's always