From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | "suyu(dot)cmj" <mengjuan(dot)cmj(at)alibaba-inc(dot)com> |
Cc: | aekorotkov <aekorotkov(at)gmail(dot)com>, tomas <tomas(at)vondra(dot)me>, "v(dot)davydov" <v(dot)davydov(at)postgrespro(dot)ru>, michael <michael(at)paquier(dot)xyz>, "bharath(dot)rupireddyforpostgres" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Newly created replication slot may be invalidated by checkpoint |
Date: | 2025-09-23 07:06:10 |
Message-ID: | CAA4eK1LC8Ao8xeZV23z+40uuMS8aF+3MnqLbqDNHoBWZXZpbvg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Sep 15, 2025 at 8:11 PM suyu.cmj <mengjuan(dot)cmj(at)alibaba-inc(dot)com> wrote:
>
>
> Additionally, while studying the InvalidatePossiblyObsoleteSlot(), I noticed a behavioral difference between PG15 (and earlier) and PG16 (and later). In PG15 and earlier, while attempting to acquire a slot, if the slot's restart_lsn advanced to be greater than oldestLSN, the slot would not be marked invalid. Starting in PG16, whether a slot is marked invalid is determined solely based on initial_restart_lsn, even if the slot's restart_lsn advances above oldestLSN while waiting, the slot will still be marked invalid. The initial_restart_lsn is recorded to report the correct invalidation cause (see discussion [2]), but why not decide whether to mark the slot as invalid based on the slot's current restart_lsn? If a slot's restart_lsn has already advanced sufficiently, shouldn't we refrain from invalidating it?
>
I haven't tried to reproduce it but I see your point. I agree that if
this is happening then we should not invalidate such slots. This is a
different problem related to a different commit than what is fixd as
2090edc6f32f652a2c. I suggest you to either start a new thread for
this or report in the original thread where this change was made.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Shlok Kyal | 2025-09-23 07:29:42 | Re: issue with synchronized_standby_slots |
Previous Message | Amit Kapila | 2025-09-23 06:49:54 | Re: Newly created replication slot may be invalidated by checkpoint |