From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgreSQL(dot)org |
Subject: | Re: Huge number of disk writes after migration to 8.1 |
Date: | 2006-01-18 18:32:55 |
Message-ID: | 20060118183255.GE19933@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-patches |
Tom Lane wrote:
> Actually, there's another problem here: if we do have row-level stats
> turned on, a manual "VACUUM" command will still cause the set of tables
> listed in the stats file to grow to include every table in the DB,
> whether or not anything interesting is happening to that table. I think
> this is probably undesirable. I'm tempted to change pgstat_recv_vacuum
> and pgstat_recv_analyze so that they will not create new hash entries,
> but only insert the row count if the hash entry already exists. I am a
> bit worried that I might be missing something about possible
> interactions with autovacuum though. I see that autovac skips vacuuming
> tables that have no hash entry ... is there some circular reasoning
> going on there?
The idea was that autovac should skip tables for which it doesn't have
info, because it can't decide and we chose to err on the side of
caution. However, after a vacuum or analyze we do have info about the
table, which is what we store in the pgstat_recv functions
inconditionally. Thus the next autovacuum is able to make an informed
decision about this table.
The principles are: 1) store as much information as possible,
2) autovacuum should act iff it has information.
I don't think this is a bug, but I'm not dead set on it if you want to
change this behavior.
--
Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J
"The first of April is the day we remember what we are
the other 364 days of the year" (Mark Twain)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-18 18:36:07 | Re: Huge number of disk writes after migration to 8.1 |
Previous Message | Marcin | 2006-01-18 18:23:03 | Re: Huge number of disk writes after migration to 8.1 |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-01-18 18:36:07 | Re: Huge number of disk writes after migration to 8.1 |
Previous Message | Tom Lane | 2006-01-18 18:14:36 | Re: Huge number of disk writes after migration to 8.1 |