Re: PANIC: wrong buffer passed to visibilitymap_clear

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-04-11T15:47:16Z
Lists: pgsql-hackers

Attachments

On Sat, Apr 10, 2021 at 10:04 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Just eyeing the evidence on hand, I'm wondering if something has decided
> it can start setting the page-all-visible bit without adequate lock,
> perhaps only in system catalogs.  heap_update is clearly assuming that
> that flag won't change underneath it, and if it did, it's clear how this
> symptom would ensue.

Does this patch seem to fix the problem?

-- 
Peter Geoghegan

Commits

  1. Avoid improbable PANIC during heap_update.

  2. Refactor lazy_scan_heap() loop.