Re: pgsql: Avoid improbable PANIC during heap_update.

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jaime Casanova <jcasanov@systemguards.com.ec>, pgsql-committers@lists.postgresql.org
Date: 2022-09-30T22:03:46Z
Lists: pgsql-hackers
On Fri, Sep 30, 2022 at 2:56 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > FWIW it seems possible that the Postgres 15 vacuumlazy.c work that
> > added lazy_scan_noprune() made this scenario more likely in practice
> > -- even compared to Postgres 14.
>
> Could be, because we haven't seen field reports of this in v14 yet.

I would be more confident here were it not for the recent
heap_delete() issue reported by one of my AWS colleagues (and fixed by
another, Jeff Davis). See commit 163b0993 if you missed it before now.

> And there's still no hard evidence of a bug pre-14.  Nonetheless,
> I'm inclined to backpatch to v12 as 34f581c39 was.

+1

-- 
Peter Geoghegan



Commits

  1. Avoid improbable PANIC during heap_update, redux.

  2. Fix race condition where heap_delete() fails to pin VM page.

  3. Avoid improbable PANIC during heap_update.