Re: Add WALRCV_CONNECTING state to walreceiver

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Rahila Syed <rahilasyed90(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add WALRCV_CONNECTING state to walreceiver
Date: 2026-01-20 01:31:33
Message-ID: CABPTF7UE+O3nXQb23pj7qQwGRMeGJ6zzaJ2O6Ai6tBzayeyRzQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Jan 20, 2026 at 7:21 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> 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(at)paquier(dot)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

Thanks for the suggestion! It makes sense to me.

--
Best,
Xuneng

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-01-20 02:20:13 Re: Patch: dumping tables data in multiple chunks in pg_dump
Previous Message Xuneng Zhou 2026-01-20 01:28:31 Re: Implement waiting for wal lsn replay: reloaded