Initialize wal_level in the initial checkpoint record.
authorRobert Haas <[email protected]>
Mon, 22 Jul 2024 19:32:43 +0000 (15:32 -0400)
committerRobert Haas <[email protected]>
Mon, 22 Jul 2024 19:32:43 +0000 (15:32 -0400)
As per Coverity and Tom Lane, commit 402b586d0 (back-patched to v17
as 2b5819e2b) forgot to initialize this new structure member in this
code path.

src/backend/access/transam/xlog.c

index 636be5ca4da4f889c84a7fa049033cb42986e707..d70ba67bac95995f9374b3f00b618a4b7a35d35e 100644 (file)
@@ -5045,6 +5045,7 @@ BootStrapXLOG(void)
    checkPoint.ThisTimeLineID = BootstrapTimeLineID;
    checkPoint.PrevTimeLineID = BootstrapTimeLineID;
    checkPoint.fullPageWrites = fullPageWrites;
+   checkPoint.wal_level = wal_level;
    checkPoint.nextXid =
        FullTransactionIdFromEpochAndXid(0, FirstNormalTransactionId);
    checkPoint.nextOid = FirstGenbkiObjectId;