From: Jim C. Nasby <jnasby@pervasive.com>
To: Robin Iddon <robin@edesix.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: 8.0.3 pg_autovacuum doesn't clear out stats table?
Date: Thu, 23 Feb 2006 17:49:45 -0600
Message-ID: <20060223234945.GN2068@pervasive.com> (raw)
In-Reply-To: <43FE48EF.4000409@edesix.com>
References: <43FD7312.5080701@edesix.com>
<43FDF046.2050609@zeut.net>
<43FDFF9A.90603@edesix.com>
<43FE0723.3070608@edesix.com>
<26139.1140730764@sss.pgh.pa.us>
<43FE467E.9090204@edesix.com>
<43FE48EF.4000409@edesix.com>
On Thu, Feb 23, 2006 at 11:44:47PM +0000, Robin Iddon wrote:
>
> >
> >In fact I just noticed that the number of stats tuples just climbed
> >from 1236 to 2634. The ins/del counts are still zero. I ran analyze
> >and the update counter went up only by 1232. For pg_autovacuum to
> >vacuum this table I need (2*2634)+1000 = 6268 updates, which is never
> >going to happen.
>
> At least not before the number of tuples has climbed to beyond that
> count based on my experience to date!
I think you're confusing tuples and rows. Everytime you update a row,
you create a new tuple. As you've seen, every time you run analyze,
~1400 rows are being updated, which means 1400 new tuples. So as long as
pg_autovacuum stays running long enough, it will notice that
pg_statistics needs to be vacuumed. Note that it's critical that
pg_autovac stay running; it keeps the counts of how many tuples every
table has in memory, so if it gets shutdown before enough updates
accumulate, the count re-starts from scratch. I'm not certain if the
builtin vacuum in 8.1 solves that problem or not.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jnasby@pervasive.com, robin@edesix.com
Subject: Re: 8.0.3 pg_autovacuum doesn't clear out stats table?
In-Reply-To: <20060223234945.GN2068@pervasive.com>
References: <43FD7312.5080701@edesix.com> <43FDF046.2050609@zeut.net> <43FDFF9A.90603@edesix.com> <43FE0723.3070608@edesix.com> <26139.1140730764@sss.pgh.pa.us> <43FE467E.9090204@edesix.com> <43FE48EF.4000409@edesix.com> <20060223234945.GN2068@pervasive.com>
* 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