]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pg_controldata: Show logical decoding status.
authorMasahiko Sawada <msawada@postgresql.org>
Thu, 16 Jul 2026 19:20:45 +0000 (12:20 -0700)
committerMasahiko Sawada <msawada@postgresql.org>
Thu, 16 Jul 2026 19:20:45 +0000 (12:20 -0700)
The logical decoding status is stored in checkpoint records and used
to restore the status at server startup, but pg_controldata did not
show it. This information is useful for diagnosing issues around the
dynamic activation and deactivation of logical decoding.

Oversight in 67c20979ce7.

Reviewed-by: Guoqing Yang <yanggq1988@126.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAD21AoAnPAugUnDic+ESvrfXjXHk2bss9eHAD7zP0-Chy2UabA@mail.gmail.com
Backpatch-through: 19

src/bin/pg_controldata/pg_controldata.c

index fe5fc5ec133b72192a8334189bd01865e330d2d7..6fc87ed114d82a827572f9ff034da2077cf20eee 100644 (file)
@@ -264,6 +264,8 @@ main(int argc, char *argv[])
                   ControlFile->checkPointCopy.PrevTimeLineID);
        printf(_("Latest checkpoint's full_page_writes: %s\n"),
                   ControlFile->checkPointCopy.fullPageWrites ? _("on") : _("off"));
+       printf(_("Latest checkpoint's logical decoding: %s\n"),
+                  ControlFile->checkPointCopy.logicalDecodingEnabled ? _("on") : _("off"));
        printf(_("Latest checkpoint's NextXID:          %u:%u\n"),
                   EpochFromFullTransactionId(ControlFile->checkPointCopy.nextXid),
                   XidFromFullTransactionId(ControlFile->checkPointCopy.nextXid));