[GENERAL/INTERFACES] Dynamically detecting need to vacuum? - Mailing list pgsql-general

From Ed Loehr
Subject [GENERAL/INTERFACES] Dynamically detecting need to vacuum?
Date
Msg-id 38553CEA.8CFFD543@austin.rr.com
Whole thread Raw
In response to vacuum analyze: Tuple is too big (corrupts DB?)  (Dirk Lutzebaeck <lutzeb@aeccom.com>)
Responses Re: [GENERAL] [GENERAL/INTERFACES] Dynamically detecting need to vacuum?
List pgsql-general
I'm seeing a few intermittent show-stopper errors (some of which I've asked
about previously in these forums) which go away after vacuum is run.  Pgsql
documentation recommends to vacuum nightly or after copying a large class
(not sure exactly what that means) or deleting a large number of records.
I'm tempted to run vaccum almost anytime I detect Pgsql errors (via perl
DBI) in order to try to salvage/retry the query at hand on the fly at the
cost of a much slower query from the user's perspective.

I'd like to learn how to programmatically calculate/detect when a vacuuming
is needed, and would like to hear any advice on how folks are successfully
doing this or think would best be done.

Any comments?

[Hackers:  it'd be nice to have pgsql optionally take care of this...]

I'm using Pg 6.5.2 on RH Linux 6.0 2.2.5-15smp via perl DBI/DBD::Pg...

Thanks in advance,
Ed Loehr


pgsql-general by date:

Previous
From: Gunther Schadow
Date:
Subject: Re: [GENERAL] Large objects + JDBC
Next
From: "Manuel Lemos"
Date:
Subject: Can't I create indexes on BOOL columns?