RE: Newly created replication slot may be invalidated by checkpoint - Mailing list pgsql-hackers

From Zhijie Hou (Fujitsu)
Subject RE: Newly created replication slot may be invalidated by checkpoint
Date
Msg-id TY4PR01MB16907255419BF5373D54D5B869497A@TY4PR01MB16907.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: Newly created replication slot may be invalidated by checkpoint  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: Newly created replication slot may be invalidated by checkpoint
List pgsql-hackers
On Wednesday, January 21, 2026 10:46 PM Kuroda, Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com> wrote:
> 
> I reproduced the issue by [1] and confirmed the issue was resolved by your
> patch. Here are my comments.
> 
> 1.
> Replication slot cannot be invalidated even when only 0002 was applied. Can
> you
> modify the workload to cause invalidation without the fix? Or is it impossible?

It's possible to cause invalidation if we avoid interrupting the test by removing
the wait_for_log(), and I have done that in this version.

> 
> 2.
> It might be matter of taste, but I do not like substituting to the argument;
> basically it's immutable. How about attached? It can indicate that minimum
> safe
> LSN would be used for the restart_lsn.
> 

I think we can do that, but I would prefer to keep the current parameter name.
So, I've opted to simply move the LSN comparison to the right of the
slot.restart_lsn assignment.

Best Regards,
Hou zj

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: DOCS - "\d mytable" also shows any publications that publish mytable
Next
From: shveta malik
Date:
Subject: Re: pg_upgrade: optimize replication slot caught-up check