pgsql: Add WalRcvGetState() to retrieve the state of a WAL receiver

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add WalRcvGetState() to retrieve the state of a WAL receiver
Date: 2025-11-04 03:57:55
Message-ID: E1vG8B9-004voc-1l@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add WalRcvGetState() to retrieve the state of a WAL receiver

This has come up as useful as an alternative of WalRcvStreaming(), to be
able to do sanity checks based on the state of a WAL receiver. This
will be used in a follow-up commit.

Author: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
Discussion: https://postgr.es/m/19093-c4fff49a608f82a0@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e0ca61e7c4d55c34d67a3cc6fa0bdea2f41d2cf2

Modified Files
--------------
src/backend/replication/walreceiverfuncs.c | 14 ++++++++++++++
src/include/replication/walreceiver.h | 1 +
2 files changed, 15 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-11-04 04:29:52 pgsql: Add assertion check for WAL receiver state during stream-archive
Previous Message Michael Paquier 2025-11-04 01:53:51 pgsql: Fix unconditional WAL receiver shutdown during stream-archive tr