pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Notice that heap page has dead items during VACUUM.
Date: Mon, 15 Mar 2021 01:07:42 +0000
Message-ID: <E1lLbhu-0007u6-FN@gemulon.postgresql.org> (raw)

Notice that heap page has dead items during VACUUM.

Consistently set a flag variable that tracks whether the current heap
page has a dead item during lazy vacuum's heap scan.  We missed the
common case where there is an preexisting (or even a new) LP_DEAD heap
line pointer.

Also make it clear that the variable might be affected by an existing
line pointer, say from an earlier opportunistic pruning operation.  This
distinction is important because it's the main reason why we can't just
use the nearby tups_vacuumed variable instead.

No backpatch.  In theory failing to set the page level flag variable had
no consequences.  Currently it is only used to defensively check if a
page marked all visible has dead items, which should never happen anyway
(if it does then the table must be corrupt).

Author: Masahiko Sawada <sawada.mshk@gmail.com>
Diagnosed-By: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/CAD21AoAtZb4+HJT_8RoOXvu4HM-Zd4HKS3YSMCH6+-W=bDyh-w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0ea71c93a06ddc38e0b72e48f1d512e5383a9c1b

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)



Message-ID: <E1lLbhu-0007u6-FN@gemulon.postgresql.org>
Permalink:  ../E1lLbhu-0007u6-FN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lLbhu-0007u6-FN@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie
  Subject: Re: pgsql: Notice that heap page has dead items during VACUUM.
  In-Reply-To: <E1lLbhu-0007u6-FN@gemulon.postgresql.org>
  References: <E1lLbhu-0007u6-FN@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox