Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Vitaly Davydov <v(dot)davydov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "tomas(at)vondra(dot)me" <tomas(at)vondra(dot)me>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Date: 2025-06-25 08:25:34
Message-ID: CAFiTN-uiVOGwPNmDBPmLnC-86hX9-pKEYH2D_OKUmJd5RAUv=g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 25, 2025 at 1:18 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear Dilip,
>
> Another idea is to call ReplicationSlotsComputeRequiredLSN() when at least one
> of the restart_lsn is updated, like attached. I feel this could reduce the computation
> bit more.

Right, that makes sense, if there is nothing updated on disk then we
can avoid computing this.

--
Regards,
Dilip Kumar
Google

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Orlov 2025-06-25 08:42:29 Re: Issue with custom operator in simple case
Previous Message Michael Paquier 2025-06-25 08:15:31 Re: Remove HeapTupleheaderSetXmin{Committed,Invalid} functions