Re: BUG #17399: Dead tuple number stats not updated on long running queries

From: Andres Freund <andres(at)anarazel(dot)de>
To: Soni M <diptatapa(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17399: Dead tuple number stats not updated on long running queries
Date: 2022-02-11 05:18:05
Message-ID: 611EAC77-3388-4FBF-8081-CBF88FDAB32F@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On February 10, 2022 8:37:10 PM PST, Soni M <diptatapa(at)gmail(dot)com> wrote:
>Sorry, accidentally send the message before finishing it.
>
>Ah yes, it is the dead tuple cannot be removed, because long running
>transactions still see them.
>Something that lead to my confusion above is pg_stat_progress_vacuum, each
>time autovacuum/manual vacuum launch during long running transaction, it
>reports that num_dead_tuples is 0, while the
>pg_stat_user_tables.n_dead_tuple still have the number of dead tuples.
>
>It is false reporting from pg_stat_progress_vacuum that lead to my
>confusion.

That just reports the number of dead tuples that it is tracking for removal. Not the number of tuples that could not yet be removed.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Agarwal, Pragati - Dell Team 2022-02-11 11:19:54 RE: Very URGENT REQUEST - Postgresql error : PANIC: could not locate a valid checkpoint record
Previous Message Soni M 2022-02-11 04:37:10 Re: BUG #17399: Dead tuple number stats not updated on long running queries