Initialize wal_level in the initial checkpoint record.
authorRobert Haas
Mon, 22 Jul 2024 19:32:43 +0000 (15:32 -0400)
committerRobert Haas
Mon, 22 Jul 2024 19:34:54 +0000 (15:34 -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 a864959296f874516b5cbe59281c26300ad8f765..bb2685304e4d58d6103aebdbe016f334b7c0e7c5 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;