Skip site navigation (1) Skip section navigation (2)

smartvacuum() instead of autovacuum

From: "Hitoshi Harada" <hitoshi_harada(at)forcia(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: smartvacuum() instead of autovacuum
Date: 2006-10-22 11:12:37
Message-ID: 200610221114.k9MBERQa007930@mbox31.po.2iij.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Hi, 

I am trying to implement smartvacuum(), which do vacuum only tables having
many dead rows, instead of autovacuum.
I read sources of autovacuum and pgstat, and found it could be if
smartvacuum() gets information from pgstat like autovacuum does.

concerns:
1. autovacuum makes vacuum nodes itself, while smartvacuum() will do it by
SPI for simplicity.
2. autovacuum allocate its own MemoryContext. Does smartvacuum() need it as
well?
3. autovacuum takes new transaction. Why?

questions:
1. Why isn't there some function like pg_stat_get_dead_rows(). if there is,
smartvacuum() can be implemented by even pl/pgsql
2. autovacuum can actually conflict with VACUUM ANALYZE on another session?

Any answers and opinions are appreciated. 
Regards,


Hitoshi Harada



Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2006-10-22 12:14:14
Subject: Re: xlogdump fixups and WAL log question.
Previous:From: Magnus HaganderDate: 2006-10-22 09:18:32
Subject: Re: Updates for vcbuild

pgsql-patches by date

Next:From: Peter EisentrautDate: 2006-10-22 13:08:28
Subject: Re: [PATCHES] smartvacuum() instead of autovacuum
Previous:From: Magnus HaganderDate: 2006-10-22 09:18:32
Subject: Re: Updates for vcbuild

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group