Re: Finding database names for overnight vacuum - Mailing list pgsql-general

From Colin 't Hart
Subject Re: Finding database names for overnight vacuum
Date
Msg-id 9lqmv2$snj$1@news.tht.net
Whole thread Raw
In response to Finding database names for overnight vacuum  (Stephen Davies <scldad@sdc.com.au>)
List pgsql-general
Quoting Stephen Davies:

> I have a cron job which vacuums etc all of my databases but it does not
> work with 7.1.2 because of the change in structure of .../data/base.
>
> It currently says:
>
> for q in /usr/local/pgsql/data/base/*; do
> blaa
> blaa
> done
>
> How does one get an equivalent list of all databases from 7.1.2?
> (and where is it documented?)

In an Oracle install, one has a file /etc/oratab (or something less
world-wide like /usr/share/oracle/oratab)
which lists the available Oracle instances. It also indicates which need to
be started at system boot -- ie. the
script which starts the Oracle instances at system boot checks this file for
which need to be started.

Someone recently posted a patch/contrib item to do this for Postgres.

A logical extension would be to have another field which indicates which
databases need to be VACUUMed
or VACUUM ANALYZEd when the approriate cron job executes.


Cheers,

Colin



pgsql-general by date:

Previous
From: "Andrew Snow"
Date:
Subject: RE: Finding database names for overnight vacuum
Next
From: Bruno Wolff III
Date:
Subject: Re: is this possible? it should be!