Re: possible vacuum improvement? - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: possible vacuum improvement?
Date
Msg-id 1031054275.21926.26.camel@jester
Whole thread Raw
In response to Re: possible vacuum improvement?  ("Mario Weilguni" <mweilguni@sime.com>)
List pgsql-hackers
On Tue, 2002-09-03 at 03:36, Mario Weilguni wrote:
> > gets updated for each transaction but log table is just an insert. So
> rather
> > than vacumming entire db, just doing 'vacuum analyze accounts' give me
> almost
> > same results.
> >
> 
> That is not really practicable, one datebase has 107 tables, and making a
> cron job
> with 107 vacuum calls is completly out of question and very error prone
> anyway.

So...  Write a script which does something like:

skiptables = "'skipme' 'andme'"
tables = `psql -c 'SELECT relname from pg_class where relname not in
(${skiptables})' template1`

for tab in ${tables} ; do vacuumdb -t ${tab}
done


Fill in the holes and your done -- get the right pg_class type, handle
schemas appropriately, etc.



pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: Memory management question
Next
From: "Marc G. Fournier"
Date:
Subject: Re: HISTORY file