Re: possible vacuum improvement?

From: Rod Taylor <rbt(at)zort(dot)ca>
To: Mario Weilguni <mweilguni(at)sime(dot)com>
Cc: shridhar_daithankar(at)persistent(dot)co(dot)in, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: possible vacuum improvement?
Date: 2002-09-03 11:57:54
Message-ID: 1031054275.21926.26.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-09-03 12:23:47 Re: HISTORY file
Previous Message Gavin Sherry 2002-09-03 11:53:27 Re: Memory management question