Skip site navigation (1) Skip section navigation (2)

[GENERAL/INTERFACES] Dynamically detecting need to vacuum?

From: Ed Loehr <ELOEHR(at)austin(dot)rr(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: [GENERAL/INTERFACES] Dynamically detecting need to vacuum?
Date: 1999-12-13 18:37:30
Message-ID: 38553CEA.8CFFD543@austin.rr.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-interfaces
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


In response to

Responses

pgsql-interfaces by date

Next:From: Ed LoehrDate: 1999-12-13 20:04:54
Subject: Re: [GENERAL] Is it safe to INSERT/DELETE during VACUUM?
Previous:From: Ivo SimicevicDate: 1999-12-13 17:31:43
Subject: Re: [INTERFACES] Table or not table ?

pgsql-general by date

Next:From: RobertDate: 1999-12-13 19:22:36
Subject: With what options RPM was compiled? ( Was: Czech Win1250 sorting q)
Previous:From: Gunther SchadowDate: 1999-12-13 16:40:53
Subject: Re: [GENERAL] Large objects + JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group