Re: [EXT] Re: Does cancelling autovacuum make you lose all the work it did? - Mailing list pgsql-novice

From Tom Lane
Subject Re: [EXT] Re: Does cancelling autovacuum make you lose all the work it did?
Date
Msg-id 798972.1592018308@sss.pgh.pa.us
Whole thread Raw
In response to Re: [EXT] Re: Does cancelling autovacuum make you lose all the workit did?  ("Greg Rychlewski (LCL)" <Greg.Rychlewski@loblaw.ca>)
List pgsql-novice
"Greg Rychlewski (LCL)" <Greg.Rychlewski@loblaw.ca> writes:
> Thanks for your reply. Regarding it being blocked, I don't think it is but I could be wrong. Both wait_event and
wait_event_typeare null. One thing I noticed though is that n_dead_tup in pg_stat_all_tables either stays the same or
goesup. Should this be going down during the autovacuum? 

No ... ongoing transactions could be creating new dead rows.  IIRC,
a vacuum won't report its removal of dead rows to the stats collector
till the very end, so what I'd expect is a big drop when it finishes.

(I am not sure offhand what happens to those stats if you cancel the
vacuum partway through --- it might report nothing, causing the
stats to be way off until the next successful vacuum.)

            regards, tom lane



pgsql-novice by date:

Previous
From: "Greg Rychlewski (LCL)"
Date:
Subject: Re: [EXT] Re: Does cancelling autovacuum make you lose all the workit did?
Next
From: Manojkumar S
Date:
Subject: ".partial" WAL file missing while promoting database in streamingreplication.