Re: Autovacuum daemon functionality questions

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Gnanakumar <gnanam(at)zoniac(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Autovacuum daemon functionality questions
Date: 2010-04-09 15:02:40
Message-ID: 20100409150240.GB4384@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2010-04-09 15:06:35 Re: Admin x DBA
Previous Message Kevin Grittner 2010-04-09 14:26:39 Re: initdb failure