Thread: vacuumdb
Hi all,
There is a way to see vacuumdb last running ?
tks
--
Juliano
There is a way to see vacuumdb last running ?
tks
--
Juliano
On Mon, Feb 13, 2006 at 01:42:06PM -0300, Juliano wrote: > Hi all, > > There is a way to see vacuumdb last running ? If you mean you'd like to know when a vacuum was last run on a table, sadly, there is no way. Though if you're using 8.1 and have autovacuum enabled there may be some way to see when it last vacuumed something. -- 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
Hmmm, AFAIK no, but you can get the age of the databases, and guess if you need to issue a vacuum or not.
quote from the documentation (www.postgresql.org -> documentation):
Best regards,
Guido
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
quote from the documentation (www.postgresql.org -> documentation):
SELECT datname, age(datfrozenxid) FROM pg_database;
The age column measures the number of transactions from the cutoff XID to the current transaction's XID.
With the standard freezing policy, the age column will start at one billion for a freshly-vacuumed database. When the age approaches two billion, the database must be vacuumed again to avoid risk of wraparound failures. Recommended practice is to vacuum each database at least once every half-a-billion (500 million) transactions, so as to provide plenty of safety margin. To help meet this rule, each database-wide VACUUM automatically delivers a warning if there are any pg_database entries showing an age of more than 1.5 billion transactions, for example:
play=# VACUUM;
WARNING: some databases have not been vacuumed in 1613770184 transactions
HINT: Better vacuum them within 533713463 transactions, or you may have a wraparound failure.
VACUUM
Best regards,
Guido
On 2/13/06, Juliano <juliano.listas@gmail.com> wrote:
Hi all,
There is a way to see vacuumdb last running ?
tks
--
Juliano
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------