Re: Add WALRCV_CONNECTING state to walreceiver - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add WALRCV_CONNECTING state to walreceiver
Date
Msg-id aW68b79-9U3WPZiz@paquier.xyz
Whole thread Raw
In response to Re: Add WALRCV_CONNECTING state to walreceiver  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: Add WALRCV_CONNECTING state to walreceiver
List pgsql-hackers
On Mon, Jan 19, 2026 at 11:35:28PM +0800, Xuneng Zhou wrote:
> On Mon, Jan 19, 2026 at 8:13 AM Michael Paquier <michael@paquier.xyz> wrote:
>> I think that
>> there would be a point in expanding the SQL functions to report more
>> states of the startup process, including the data received by the
>> startup process, but we should not link that to the state of the WAL
>> receiver.  An extra reason to not do that: WAL receivers are not the
>> only source feeding data to the startup process, we could have data
>> pushed to pg_wal/, or archive commands/modules doing this job.
>
> +1. I'll prepare a separate patch to expose startup process metrics
> like pg_stat_get_wal_receiver does. This would complement
> pg_stat_wal_receiver without coupling the two subsystems.

In this area, I mean to expose the contents of XLogRecoveryCtlData at
SQL level.  It may be better to move this structure to a header, and
have the new SQL function in xlogfuncs.c.  That's at least how I would
shape such a change.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
Next
From: Michael Paquier
Date:
Subject: Re: Extended Statistics set/restore/clear functions.