From: | Thomas F(dot)O'Connell <tfo(at)sitening(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pg_autovacuum start-script |
Date: | 2004-08-27 19:25:49 |
Message-ID: | E71DF318-F85E-11D8-B059-000D93AE0944@sitening.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm about to try to implement a simple pg_autovacuum script that can be
used in conjunction with or integrated entirely with the contrib
start-scripts for postgres. I just want to check that what I'm doing
has the appropriate sanity checks.
The behavior I'm considering is:
if pg_ctl status returns a good value then
if pg_autovacuum is not running then
start pg_autovacuum
else
error
else
error
Based on what I (think I) know, this covers the cases where:
1. There is not a valid instance of postgres running.
2. There is already a valid instance of pg_autovacuum running (which
can still run as a daemon even in the event that postgres is stopped,
IIRC).
3. It is safe to start pg_autovacuum because neither of the above cases
holds.
Is this logic sufficiently sane?
In a subsequent iteration, I could even warn, I suppose, if the script
discovered any vacuums (whether initiated by pg_autovacuum or no)
already running.
-tfo
From | Date | Subject | |
---|---|---|---|
Next Message | Dino Vliet | 2004-08-27 19:35:42 | Re: help with trigger |
Previous Message | Greg Stark | 2004-08-27 19:23:36 | Re: R: R: space taken by a row & compressed data |