public inbox for [email protected]  
help / color / mirror / Atom feed
From: Amit Kapila <[email protected]>
To: Alexander Korotkov <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Vitaly Davydov <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Date: Fri, 18 Jul 2025 16:18:22 +0530
Message-ID: <CAA4eK1+qYg2nwa7TVz2xN-9FDZHLUGT7NLWHtfdeaf32KN3QEQ@mail.gmail.com> (raw)
In-Reply-To: <CAPpHfdsrgfao+1Dq8-ZqBLqnor0g2iuc0spQqNntN+W7-8i7vw@mail.gmail.com>
References: <1d12d2-67235980-35-19a406a0@63439497>
	<CAPpHfdtp61pSt72KxxOnnV_Oj4OTAiKYCSTek0Pm87hVDod4Bg@mail.gmail.com>
	<CAA4eK1Lmd-stXWrNqX9iXugjY=ahhe7zRfyq+-vN512xvF4G2w@mail.gmail.com>
	<CAPpHfdsTiYQPywr4yeqVhUtA+eFdqisqcAOiTb+kiYhi9EVEvw@mail.gmail.com>
	<CAPpHfdvk-nfu5xzJyPArxWctofWPR+1L9uJ+yyWFA34n6b5rGQ@mail.gmail.com>
	<CAA4eK1Ladnm40UO-YC+c7eBYqjyFQSwg0dn1w_CiaMoBTsJUDA@mail.gmail.com>
	<CAPpHfduX--KKX853UwaJ8Cjo5bxbh19V_+McKQ3p9aS6b8T1Wg@mail.gmail.com>
	<CAA4eK1+VbBxYY-rG4B7Jq6TsYvdjt3d2nbUrs7p9-1sP5mH+sw@mail.gmail.com>
	<CAPpHfdvxqjE+RZdoOODQZAmQip6NpvSH40DuvVFWuf_00ek-yQ@mail.gmail.com>
	<1d97ec-6841b600-3-b7b4780@40747246>
	<CAA4eK1LvssAcp61qg957xRF0=K4xF0hfJQjQ6c9V7EGHSqraPg@mail.gmail.com>
	<28c8bf-68470780-3-51b29480@89454035>
	<CAPpHfdt77k3BqD=anh4b7UiRevfPOu2Hcf3rvSZXntxH+4G=Ug@mail.gmail.com>
	<[email protected]>
	<CAPpHfdvPpg5VUTNOqfKSNx66ij3ZJNZbf4kn6SDcPkdq9FTvng@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAPpHfdvJMe4i0_wp1tq2ZGSDKqUHKPwkfD_Y6KyJ3XQRFvc0cQ@mail.gmail.com>
	<OSCPR01MB1496667BEA93302F8903EE512F570A@OSCPR01MB14966.jpnprd01.prod.outlook.com>
	<CAPpHfdsdJ4YPTzH=cnany5_LjCNb_Z9e+Oucv53qYQHaHzJhag@mail.gmail.com>
	<CALDaNm3s-jpQTe1MshsvQ8GO=TLj233JCdkQ7uZ6pwqRVpxAdw@mail.gmail.com>
	<3f242e-68518380-11-78125f00@134027639>
	<CAPpHfds0ScFbExsT+pnY7K0JGH6pFPHMOSfCOknC-1s7ahmRFA@mail.gmail.com>
	<214ba-6852df80-9-7e0df800@134698799>
	<21b44-6852e000-3-a556820@87831171>
	<CAPpHfdv3UEUBjsLhB_CwJT0xX9LmN6U+__myYopq4KcgvCSbTg@mail.gmail.com>
	<CAA4eK1+qL9QFOD2Q5kcq0Ff=7OcBLE34QuDBdPcdznUzQwv+eg@mail.gmail.com>
	<CAPpHfdvk5RxdKZuFDFgDet6ZAzVW0ojxP-pjjqZPFZUW2N5gEA@mail.gmail.com>
	<CAA4eK1JnPmVW+yxJSxxjU+-93x4TojSZhK9v1ZavH8uCe_5Arw@mail.gmail.com>
	<OSCPR01MB1496634CF3BFEC3A491CF8111F547A@OSCPR01MB14966.jpnprd01.prod.outlook.com>
	<CAPpHfdsrgfao+1Dq8-ZqBLqnor0g2iuc0spQqNntN+W7-8i7vw@mail.gmail.com>

On Fri, Jul 18, 2025 at 4:15 PM Alexander Korotkov <[email protected]> wrote:
>
> On Sun, Jun 29, 2025 at 9:22 AM Hayato Kuroda (Fujitsu)
> <[email protected]> wrote:
> > Thanks everyone who are working on the bug. IIUC the remained task is
> > to add code comments for avoiding the same mistake again described here:
> >
> > > Sounds reasonable. As per analysis till now, it seems removal of new
> > > assert is correct and we just need to figure out the reason in all
> > > failure cases as to why the physical slot's restart_lsn goes backward,
> > > and then add a comment somewhere to ensure that we don't repeat a
> > > similar mistake in the future.
> >
> > I've wrote a draft for that. How do you think?
>
> Looks good to me.  I'm going to push this if no objections.
>

As discussed earlier, it is a good idea to add comments in this area.
But as this is for pre-existing cases, won't it be better to start a
new thread explaining the cases and a patch? We may get feedback from
others as well.

-- 
With Regards,
Amit Kapila.





view thread (77+ messages)  latest in thread

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], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
  In-Reply-To: <CAA4eK1+qYg2nwa7TVz2xN-9FDZHLUGT7NLWHtfdeaf32KN3QEQ@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