Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup
Date: 2021-04-17 01:54:19
Message-ID: CAH2-WzngsOzgkigYGVsj7E95fOhxE-k79utxuofjAunJjDZ2eA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 16, 2021 at 1:16 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> I'm not sure what to do, though. Both the INDEX_CLEANUP = off case and
> the failsafe case are only intended for emergencies. And it's hard to
> know what to do in a code path that is designed to rarely or never be
> used.

How about just documenting it in comments, as in the attached patch? I
tried to address all of the issues with LP_DEAD accounting together.
Both the issue raised by Masahiko, and one or two others that were
also discussed recently on other threads. They all seem kind of
related to me.

I didn't address the INDEX_CLEANUP = off case in the comments directly
(I just addressed the failsafe case). There is no good reason to think
that the situation will resolve with INDEX_CLEANUP = off, so it didn't
seem wise to mention it too. But that should still be okay --
INDEX_CLEANUP = off has practically been superseded by the failsafe,
since it is much more flexible. And, anybody that uses INDEX_CLEANUP =
off cannot expect to never do index cleanup without seriously bad
consequences all over the place.

--
Peter Geoghegan

Attachment Content-Type Size
0001-VACUUM-accounting-Explain-LP_DEAD-accounting.patch application/x-patch 6.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-04-17 02:17:55 Re: terminate called after throwing an instance of 'std::bad_alloc'
Previous Message Thomas Munro 2021-04-17 01:34:28 Re: Bogus collation version recording in recordMultipleDependencies