Re: Fix pg_stat_wal_receiver to show CONNECTING status - Mailing list pgsql-hackers

From Xuneng Zhou
Subject Re: Fix pg_stat_wal_receiver to show CONNECTING status
Date
Msg-id CABPTF7VSX4b29unitKHN-dtiTy6hx3nvLsirUBNA=opOhnv+Mg@mail.gmail.com
Whole thread
In response to Re: Fix pg_stat_wal_receiver to show CONNECTING status  (Xuneng Zhou <xunengzhou@gmail.com>)
List pgsql-hackers
On Sat, May 23, 2026 at 8:51 AM Xuneng Zhou <xunengzhou@gmail.com> wrote:
>
> On Fri, May 22, 2026 at 4:56 PM Chao Li <li.evan.chao@gmail.com> wrote:
> >
> >
> >
> > > On May 23, 2026, at 07:23, Michael Paquier <michael@paquier.xyz> wrote:
> > >
> > > On Fri, May 22, 2026 at 10:06:33AM +0800, Chao Li wrote:
> > >> Here comes the patch set:
> > >>
> > >> * v3-0001 is the exactly same as v2-0001
> > >> * In v3-0002, the change in walreceiverfuncs.c is the same as the
> > >> * previous diff, and I tuned the test change a little bit.
> > >
> > > Okay, applied the first one on HEAD, and backpatched the second one.
> > > --
> > > Michael
> >
> > Thank you very much for applying the patch and still working hard during the PGConf.
> >
>
>
> Thanks for dealing with this and sorry for being late in the game.
> I'll do a post-commit review while I'm on the flight.


I agree with Michael's point that displaying partial columns gated by
the flag ready-to-display is not very ideal. Showing two columns in
connecting status inconsistently in some scenarios implies something
broken under the hood.[1] It may require extra documentation effort to
dispel the confusion for the user.

As for the timeline/lsn and timestamp values, they may still be useful
operationally because they reveal when the WAL receiver entered this
part of the code. Although they are not meant to be used and
interpreted in this way... So there's some risk for misinterpretation,
but they precedes the changes.

[1] https://www.postgresql.org/message-id/aaj_WA1Du4micf9t@paquier.xyz


--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.



pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: splitting pg_resetwal output strings
Next
From: SATYANARAYANA NARLAPURAM
Date:
Subject: [PATCH] Fix NULL dereference in subscription REFRESH on concurrent DROP