Document slot's restart_lsn can go backward

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Document slot's restart_lsn can go backward
Date: 2025-07-18 11:40:49
Message-ID: CAPpHfdvuyMrUg0Vs5jPfwLOo1M9B-GP5j_My9URnBX0B=nrHKw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

While working on the patch fixing the situation when slot's
restart_lsn ends up pointing to a removed WAL segment [1], we
discovered that sometimes slot's restart_lsn can go backward
[2][3][4]. Hayato Kuroda proposed a patch [5], which improves
comments by describing this behavior. As proposed by Amit Kapila [6],
I'm starting a new thread about this comments patch.

Any feedback on this patch?

Links.
1. https://www.postgresql.org/message-id/1d12d2-67235980-35-19a406a0%4063439497
2. https://www.postgresql.org/message-id/OSCPR01MB1496646E4CF72B9231DB711AFF57DA%40OSCPR01MB14966.jpnprd01.prod.outlook.com
3. https://www.postgresql.org/message-id/CALDaNm1prhebmnAY_0%3D5UJ-WodSSbj6C8X-igrGa1EamtLw5BA%40mail.gmail.com
4. https://www.postgresql.org/message-id/CALDaNm34RtDat%2BkZE_1%2BCY86pDLJM18hxNRTZx3CCGE%3DaN%3D_%3DA%40mail.gmail.com
5. https://www.postgresql.org/message-id/OSCPR01MB1496634CF3BFEC3A491CF8111F547A%40OSCPR01MB14966.jpnprd01.prod.outlook.com
6. https://www.postgresql.org/message-id/CAA4eK1%2BqYg2nwa7TVz2xN-9FDZHLUGT7NLWHtfdeaf32KN3QEQ%40mail.gmail.com

------
Regards,
Alexander Korotkov
Supabase

Attachment Content-Type Size
0001-Update-comment-for-last_saved_restart_lsn.patch application/octet-stream 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2025-07-18 11:41:31 Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Previous Message Peter Eisentraut 2025-07-18 11:12:34 Re: C11 / VS 2019