Add pg_resetwal and pg_controldata support for new control file field
authorHeikki Linnakangas <[email protected]>
Tue, 11 Nov 2025 17:00:34 +0000 (19:00 +0200)
committerHeikki Linnakangas <[email protected]>
Tue, 11 Nov 2025 17:00:34 +0000 (19:00 +0200)
I forgot these in commit 3e0ae46d90.

Discussion: https://www.postgresql.org/message-id/2afded89-f9f0-4191-84d8-8b8668e029a1@iki.fi

src/bin/pg_controldata/pg_controldata.c
src/bin/pg_resetwal/pg_resetwal.c

index 10de058ce91f4859070799f05d5ca0c690f6a14d..5c77f40313b4e54800e8346e5018ae4f4a8daef1 100644 (file)
@@ -317,6 +317,8 @@ main(int argc, char *argv[])
                   ControlFile->blcksz);
        printf(_("Blocks per segment of large relation: %u\n"),
                   ControlFile->relseg_size);
+       printf(_("Pages per SLRU segment:               %u\n"),
+                  ControlFile->slru_pages_per_segment);
        printf(_("WAL block size:                       %u\n"),
                   ControlFile->xlog_blcksz);
        printf(_("Bytes per WAL segment:                %u\n"),
index a89d72fc5cfec45f6110b1bdf133bb4f00ed44f7..69a7cf0416d7326b61a9aa7ee8e969b94b33d06b 100644 (file)
@@ -697,6 +697,7 @@ GuessControlValues(void)
        ControlFile.floatFormat = FLOATFORMAT_VALUE;
        ControlFile.blcksz = BLCKSZ;
        ControlFile.relseg_size = RELSEG_SIZE;
+       ControlFile.slru_pages_per_segment = SLRU_PAGES_PER_SEGMENT;
        ControlFile.xlog_blcksz = XLOG_BLCKSZ;
        ControlFile.xlog_seg_size = DEFAULT_XLOG_SEG_SIZE;
        ControlFile.nameDataLen = NAMEDATALEN;
@@ -766,6 +767,8 @@ PrintControlValues(bool guessed)
                   ControlFile.blcksz);
        printf(_("Blocks per segment of large relation: %u\n"),
                   ControlFile.relseg_size);
+       printf(_("Pages per SLRU segment:               %u\n"),
+                  ControlFile.slru_pages_per_segment);
        printf(_("WAL block size:                       %u\n"),
                   ControlFile.xlog_blcksz);
        printf(_("Bytes per WAL segment:                %u\n"),