Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup

2021-04-19 Thread Peter Geoghegan
On Fri, Apr 16, 2021 at 6:54 PM Peter Geoghegan wrote: > 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

Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup

2021-04-16 Thread Peter Geoghegan
On Fri, Apr 16, 2021 at 1:16 PM Peter Geoghegan 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

Re: ANALYZE counts LP_DEAD line pointers as n_dead_tup

2021-04-16 Thread Peter Geoghegan
On Wed, Apr 14, 2021 at 7:11 AM Masahiko Sawada wrote: > If we create a table with vacuum_index_cleanup = off or execute VACUUM > with INDEX_CLEANUP = off, vacuum updates pg_stat_all_tables.n_dead_tup > to the number of HEAPTUPLE_RECENTLY_DEAD tuples. Whereas analyze > updates it to the sum of

ANALYZE counts LP_DEAD line pointers as n_dead_tup

2021-04-14 Thread Masahiko Sawada
Hi all, If we create a table with vacuum_index_cleanup = off or execute VACUUM with INDEX_CLEANUP = off, vacuum updates pg_stat_all_tables.n_dead_tup to the number of HEAPTUPLE_RECENTLY_DEAD tuples. Whereas analyze updates it to the sum of the number of HEAPTUPLE_DEAD/RECENTLY_DEAD tuples and