Re: Fix pg_stat_wal_receiver to show CONNECTING status

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Fix pg_stat_wal_receiver to show CONNECTING status
Date: 2026-05-24 03:51:40
Message-ID: CABPTF7VSX4b29unitKHN-dtiTy6hx3nvLsirUBNA=opOhnv+Mg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 23, 2026 at 8:51 AM Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
>
> On Fri, May 22, 2026 at 4:56 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> >
> >
> >
> > > On May 23, 2026, at 07:23, Michael Paquier <michael(at)paquier(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Álvaro Herrera 2026-05-24 03:50:48 Re: splitting pg_resetwal output strings