Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup
Date
Msg-id CAH2-WzngsOzgkigYGVsj7E95fOhxE-k79utxuofjAunJjDZ2eA@mail.gmail.com
Whole thread Raw
In response to Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup
List pgsql-hackers
On Fri, Apr 16, 2021 at 1:16 PM Peter Geoghegan <pg@bowt.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

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Bogus collation version recording in recordMultipleDependencies
Next
From: Andres Freund
Date:
Subject: Re: terminate called after throwing an instance of 'std::bad_alloc'