public inbox for [email protected]  
help / color / mirror / Atom feed
From: Shinya Kato <[email protected]>
To: Fujii Masao <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_stat_replication.*_lag sometimes shows NULL during active replication
Date: Thu, 26 Mar 2026 14:40:37 +0900
Message-ID: <CAOzEurT7E4fX5jrHza4+BZt5krEc-0b0vXdHRNCjwNnrDy8g_Q@mail.gmail.com> (raw)
In-Reply-To: <CAHGQGwHLK5ObQShRx15OwBK4whO7MQ0VXveBtxDsMiibGUGK_g@mail.gmail.com>
References: <CAOzEurTzcUrEzrH97DD7+Yz=HGPU81kzWQonKZvqBwYhx2G9_A@mail.gmail.com>
	<CAHGQGwE=kyQ+YnGPn8zpZ959+3ywg8OR_Nu__uXxxuE0E+Y_Zg@mail.gmail.com>
	<CAOzEurRGiGE2Dfe+ySpb=+93ku=7ZC6RgAbHtLC6Xsq3g2XexA@mail.gmail.com>
	<CAHGQGwH2h_R7FWPvEs3+NWLwHZoj9r96tUyRKi5haqxMc6FXiQ@mail.gmail.com>
	<CAOzEurQiP3uebd1GMiC1Dzf5VJwF4ZBEpJ6QYQFE6Y+rVjxqNA@mail.gmail.com>
	<CAHGQGwEmMBBAE0RG-R3_LacfT4fbB55qGE6n9O5mNwrqvbNBtw@mail.gmail.com>
	<CAOzEurRF+OWcMZpfE=NV_Wcm6CFFGOnuxC6L9WWCjOMN0_eZMQ@mail.gmail.com>
	<CAHGQGwGPg20Rw2PydBDXiKHgn55s--E14-qRy7t3M+DHreCJww@mail.gmail.com>
	<CAOzEurSDzFsRXjofhq7mbNgoL8HaVbNeEhWBm7m9_K2ZNQnaBw@mail.gmail.com>
	<CAHGQGwFzg9J_z71kwnjXOxaoO3upMW8RdT4ieE8MBLq6h-ojZg@mail.gmail.com>
	<CAOzEurRV117N2neo1N_O+xWPv=-R7qou+i7k-h79JjTP9sO1Fg@mail.gmail.com>
	<CAHGQGwGLUXmjC1+A1fzg-ynP1pdKC-0yfmLYcnnu4YJSEDnuQw@mail.gmail.com>
	<CAOzEurSAvOf-vxzn9yQaCipgD6bSr4ncoTYjFceAPDO5fzMNNw@mail.gmail.com>
	<CAHGQGwGRLOYj95OfQ5T+mJYmyQ8YrvQ1SNOkiviV+5aWT1iCoA@mail.gmail.com>
	<CAOzEurRHuBYBt4BXyFnD8DL9dDgbAexqSC9HOT2=6swiyLS1Kw@mail.gmail.com>
	<CAHGQGwHLK5ObQShRx15OwBK4whO7MQ0VXveBtxDsMiibGUGK_g@mail.gmail.com>

On Thu, Mar 26, 2026, 00:30 Fujii Masao <[email protected]> wrote:

> On Wed, Mar 25, 2026 at 4:03 PM Shinya Kato <[email protected]>
> wrote:
> > Thanks for the updated patch. LGTM.
> >
> > Regarding the backpatch, I'd personally appreciate it if the walsender.c
> changes were backpatched to stable branches. As you noted, it don't fully
> solve the reported issue, but they do help reduce the cases where lag
> columns in pg_stat_replication unexpectedly become NULL.
> >
> > Even a partial mitigation in the back branches would be valuable for
> users running stable releases.
>
> +1
>
> I've split the changes into two patches.
>
> Patch 0001 fixes premature NULL lag reporting in walsender. I will commit
> it
> and backpatch it to all supported branches.
>
> Patch 0002 avoids sending duplicate WAL locations in standby status
> replies.
> I will commit this to master only.
>

Thanks, LGTM.

Best regards,
Shinya Kato

>


view thread (21+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: pg_stat_replication.*_lag sometimes shows NULL during active replication
  In-Reply-To: <CAOzEurT7E4fX5jrHza4+BZt5krEc-0b0vXdHRNCjwNnrDy8g_Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox