From 7e09f1e9e8182952023a266619b4214ca2489353 Mon Sep 17 00:00:00 2001 From: Andrey Borodin Date: Wed, 22 Jul 2026 12:38:58 +0500 Subject: [PATCH v7-AB-edited 4/6] fixup! Add `primary_last_archived` column to pg_stat_wal_receiver view. Fixes to squash into v7-0002: * Update src/test/regress/expected/rules.out for the new column; the main regression suite (rules test) was failing without it. * Actually bump catversion, as the commit message already claimed. * Document the new primary_last_archived column in monitoring.sgml. --- doc/src/sgml/monitoring.sgml | 12 ++++++++++++ src/include/catalog/catversion.h | 2 +- src/test/regress/expected/rules.out | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index d1a20d001e9..b37dcb97be6 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1920,6 +1920,18 @@ description | Waiting for a newly initialized WAL file to reach durable storage + + + primary_last_archived text + + + Name of the last WAL file archived by the primary, as reported by + the upstream server. Only set when + is shared; see + . + + + slot_name text diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index d0399cc1cbe..2cb2f43fa82 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202607201 +#define CATALOG_VERSION_NO 202607221 #endif diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out index 6a3341356da..eae03d9c105 100644 --- a/src/test/regress/expected/rules.out +++ b/src/test/regress/expected/rules.out @@ -2444,11 +2444,12 @@ pg_stat_wal_receiver| SELECT pid, last_msg_receipt_time, latest_end_lsn, latest_end_time, + primary_last_archived, slot_name, sender_host, sender_port, conninfo - FROM pg_stat_get_wal_receiver() s(pid, status, receive_start_lsn, receive_start_tli, written_lsn, flushed_lsn, received_tli, last_msg_send_time, last_msg_receipt_time, latest_end_lsn, latest_end_time, slot_name, sender_host, sender_port, conninfo) + FROM pg_stat_get_wal_receiver() s(pid, status, receive_start_lsn, receive_start_tli, written_lsn, flushed_lsn, received_tli, last_msg_send_time, last_msg_receipt_time, latest_end_lsn, latest_end_time, primary_last_archived, slot_name, sender_host, sender_port, conninfo) WHERE (pid IS NOT NULL); pg_stat_xact_all_tables| SELECT c.oid AS relid, n.nspname AS schemaname, -- 2.50.1 (Apple Git-155)