public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fujii Masao <[email protected]>
To: Hüseyin Demir <[email protected]>
Cc: [email protected]
Cc: Ants Aasma <[email protected]>
Subject: Re: Checkpoint replication slots later
Date: Fri, 10 Jul 2026 23:55:49 +0900
Message-ID: <CAHGQGwEnh2AnOZz+_tfUR9j=xb6FVe=hbHmd0pYPSky5AQ-_Vg@mail.gmail.com> (raw)
In-Reply-To: <177894945149.1016.16623043430281952415.pgcf@coridan.postgresql.org>
References: <CANwKhkPCBcTQ_pk06MD5W5YYNnuYHp8dLNuOUz8-5pMBMPY1Bw@mail.gmail.com>
	<177894945149.1016.16623043430281952415.pgcf@coridan.postgresql.org>

On Sun, May 17, 2026 at 1:38 AM Hüseyin Demir <[email protected]> wrote:
>
> Hi Ant,
>
> Good idea.

+1.

CheckPointSnapBuild() and CheckPointLogicalRewriteHeap() call
ReplicationSlotsComputeLogicalRestartLSN(), which seems to use
last_saved_restart_lsn for persistent logical slots. Since
last_saved_restart_lsn is updated by CheckPointReplicationSlots(),
if those functions run before it, their cleanup decisions are still
based on the restart_lsn saved at the previous checkpoint.

So, isn't it better to move them after CheckPointReplicationSlots()
as well, so that logical snapshot and rewrite mapping cleanup can use
the newly saved restart_lsn?

Of course, we'd first need to confirm that doing so is safe, though.

Regards,

-- 
Fujii Masao






view thread (2+ messages)

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], [email protected]
  Subject: Re: Checkpoint replication slots later
  In-Reply-To: <CAHGQGwEnh2AnOZz+_tfUR9j=xb6FVe=hbHmd0pYPSky5AQ-_Vg@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