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

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Alexander Korotkov' <aekorotkov(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(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-27 02:22:27
Message-ID: OSCPR01MB149666CB55DBC2170B1BA9F12F545A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Alexander,

> Regarding last_saved_restart_lsn_updated, I think the opposite. I
> think we should check if last_saved_restart_lsn_updated is set already
> only if it could promise us some economy of resources. In our case
> the main check only compares two fields of slot. And that fields are
> to be accessed anyway. So, we are not going to save any RAM accesses.
> Therefore, checking for last_saved_restart_lsn_updated seems like
> unnecessary code complication (and I don't see we're doing that in
> other places). So, I'm going to push this patch "as is".

To clarify: I have no objections. Thanks for giving the knowledge.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2025-06-27 02:28:10 RE: Conflict detection for update_deleted in logical replication
Previous Message jian he 2025-06-27 02:09:28 Re: SQL:2023 JSON simplified accessor support