Re: Autovacuum daemon functionality questions - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: Autovacuum daemon functionality questions
Date
Msg-id 20100409150240.GB4384@alvh.no-ip.org
Whole thread Raw
In response to Re: Autovacuum daemon functionality questions  ("Gnanakumar" <gnanam@zoniac.com>)
List pgsql-admin
Gnanakumar wrote:

> >There are two separate counters for live and dead tuples, IIRC (though
> >they may not be exposed in the pg_stat views)
>
> I've a stop/start of PostgreSQL service on a daily basis.  Since these 2
> counters are not stored/saved in tables and not available in pg_stat views
> also, will these values be persisted/retained even after stop/start/restart?

Yes, they persist.

> >There are two separate counters for live and dead tuples
> As per documentation, live tuples can always be obtained from
> pg_class.reltuples.  So, the question/answer here again would be to have
> only counter on dead tuples since last VACUUM.  Is my understanding right?
> Is there some other/alternative way where I can check obsolete tuples at any
> time since last VACUUM?

reltuples is only updated by VACUUM and ANALYZE, which is why pgstats
keeps track of numbers of tuples inserted/deleted/updated for a more
accurate dead and live tuple counts, for autovacuum purposes.

> >> 3. Is there a way to see autovacuum daemon log entries?
>
> >Not in 8.2.
>
> From which next version of PostgreSQL is it available?   Any pointers to
> relevant documentation are appreciated.

8.3
http://www.postgresql.org/docs/8.3/static/runtime-config-autovacuum.html

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: initdb failure
Next
From: "Kevin Grittner"
Date:
Subject: Re: Admin x DBA