Document slot's restart_lsn can go backward

Started by Alexander Korotkovover 1 year ago5 messageshackers
Jump to latest
#1Alexander Korotkov
aekorotkov@gmail.com

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.
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. /messages/by-id/1d12d2-67235980-35-19a406a0@63439497
2. /messages/by-id/OSCPR01MB1496646E4CF72B9231DB711AFF57DA@OSCPR01MB14966.jpnprd01.prod.outlook.com
3. /messages/by-id/CALDaNm1prhebmnAY_0=5UJ-WodSSbj6C8X-igrGa1EamtLw5BA@mail.gmail.com
4. /messages/by-id/CALDaNm34RtDat+kZE_1+CY86pDLJM18hxNRTZx3CCGE=aN=_=A@mail.gmail.com
5. /messages/by-id/OSCPR01MB1496634CF3BFEC3A491CF8111F547A@OSCPR01MB14966.jpnprd01.prod.outlook.com
6. /messages/by-id/CAA4eK1+qYg2nwa7TVz2xN-9FDZHLUGT7NLWHtfdeaf32KN3QEQ@mail.gmail.com

------
Regards,
Alexander Korotkov
Supabase

Attachments:

0001-Update-comment-for-last_saved_restart_lsn.patchapplication/octet-stream; name=0001-Update-comment-for-last_saved_restart_lsn.patchDownload+19-1
#2Alexander Korotkov
aekorotkov@gmail.com
In reply to: Alexander Korotkov (#1)
Re: Document slot's restart_lsn can go backward

On Fri, Jul 18, 2025 at 2:40 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:

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?

If nobody has additions/objections, I'll push this change.

------
Regards,
Alexander Korotkov
Supabase

#3Amit Kapila
amit.kapila16@gmail.com
In reply to: Alexander Korotkov (#1)
Re: Document slot's restart_lsn can go backward

On Fri, Jul 18, 2025 at 5:11 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:

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?

I have tried to slightly improve the comments. You can include the
suggestions, if you and/or kuroda-san thinks that the suggestions make
the patch better.

--
With Regards,
Amit Kapila.

Attachments:

v2-0001-Update-comment-for-last_saved_restart_lsn.patchapplication/octet-stream; name=v2-0001-Update-comment-for-last_saved_restart_lsn.patchDownload+19-1
#4vignesh C
vignesh21@gmail.com
In reply to: Amit Kapila (#3)
Re: Document slot's restart_lsn can go backward

On Mon, 21 Jul 2025 at 11:04, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Jul 18, 2025 at 5:11 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:

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?

I have tried to slightly improve the comments. You can include the
suggestions, if you and/or kuroda-san thinks that the suggestions make
the patch better.

Your changes look good to me.

Regards,
Vignesh

#5Alexander Korotkov
aekorotkov@gmail.com
In reply to: vignesh C (#4)
Re: Document slot's restart_lsn can go backward

On Mon, Jul 21, 2025 at 11:40 AM vignesh C <vignesh21@gmail.com> wrote:

On Mon, 21 Jul 2025 at 11:04, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Fri, Jul 18, 2025 at 5:11 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:

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?

I have tried to slightly improve the comments. You can include the
suggestions, if you and/or kuroda-san thinks that the suggestions make
the patch better.

Your changes look good to me.

Pushed!
Thanks to everybody involved.

------
Regards,
Alexander Korotkov
Supabase