Re: pgsql: Avoid improbable PANIC during heap_update.

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2022-10-06T16:28:36Z
Lists: pgsql-hackers
On 2022-Sep-29, Jaime Casanova wrote:

> This doesn't look as improbable because I saw it at least 3 times with
> v15beta4.

To further the case of the not-so-low-probability, we have customers
that are hitting this about once per day, with Postgres 14 ... so their
systems are crashing all the time :-(  We've collected a bunch of
backtraces, and while I didn't analyze all of them, I hear that they all
look related to this fix.

Not good.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)



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.