Re: Standby server with cascade logical replication could not be properly stopped under load

From: Ajin Cherian <itsajin(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alexey Makhmutov <a(dot)makhmutov(at)postgrespro(dot)ru>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Standby server with cascade logical replication could not be properly stopped under load
Date: 2025-05-29 10:28:01
Message-ID: CAFPTHDZu40jysBrqmSYHpumoEDFDs8JoZL3hsN80rFt394Fttw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, May 29, 2025 at 5:02 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> nd master versions.
>
> Yeah, I think that this is a sensible move. Documenting the reason
> why GetXLogReplayRecPtr() is called is important, but the comment you
> are suggesting could be better, IMO, say:
> "For cascading logical WAL senders, we use the replay LSN rather than
> the flush LSN, as decoding would only happen with records already
> replayed. This distinction is important especially during the
> shutdown sequence, as cascading logical WAL senders can only catch up
> with records that have been already replayed, not flushed."
>
> That feels that I'm repeating myself a bit twice if formulated this
> way. If you have a better suggestion, feel free..
>
>
> I think this new fix is much better and cleaner. A suggestion for the
comment:
"For cascading logical WAL senders, we use the replay LSN instead of the
flush LSN, since logical decoding on a standby only processes WAL that has
been replayed. This distinction becomes particularly important during
shutdown, as new WAL is no longer replayed and the last replayed LSN marks
the furthest point up to which decoding can proceed."

regards,
Ajin Cherian
Fujitsu Australia

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2025-05-29 12:09:57 RE: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5
Previous Message Amit Kapila 2025-05-29 08:22:44 Re: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5