pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Chris Kim <christopherkim22@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Autovacuum/Analyze Doesn't seem to be running properly
Date: Wed, 4 Mar 2020 17:52:56 -0300
Message-ID: <20200304205256.GA22843@alvherre.pgsql> (raw)
In-Reply-To: <CAAEyfN765PRpc9Uf9gUjZZUdGUhqzG74t9knKJj+ozHH8yh+1Q@mail.gmail.com>

On 2020-Mar-04, Chris Kim wrote:

> In my testing it looks like pg_stat_reset was ran, but I haven't been able
> to verify this from my logs.
> 
> Is there another way the stats could get reset?

Yes, a crash/restart does that.

> Does autovacuum use the stats from pg_stat_user_table meaning if there 50
> live tuples and 1000 dead tuples, but then the stats are reset, those dead
> tuples would never get cleaned up until there was new activity on that
> table?

That's correct.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (5+ messages)  latest in thread

Message-ID: <20200304205256.GA22843@alvherre.pgsql>
Permalink:  ../20200304205256.GA22843@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200304205256.GA22843@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alvherre@2ndquadrant.com, christopherkim22@gmail.com, laurenz.albe@cybertec.at, pgsql-admin@lists.postgresql.org
  Subject: Re: Autovacuum/Analyze Doesn't seem to be running properly
  In-Reply-To: <20200304205256.GA22843@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox