Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA44354; Mon, 13 Dec 1999 13:36:38 -0500 (EST) (envelope-from ELOEHR@austin.rr.com) Received: from austin.rr.com ([24.93.58.250]) by Mail.austin.rr.com with Microsoft SMTPSVC(5.5.1877.197.19); Mon, 13 Dec 1999 12:28:20 -0600 Sender: ed Message-ID: <38553CEA.8CFFD543@austin.rr.com> Date: Mon, 13 Dec 1999 12:37:30 -0600 From: Ed Loehr X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20smp i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-general@postgresql.org, pgsql-interfaces@postgresql.org Subject: [GENERAL/INTERFACES] Dynamically detecting need to vacuum? References: <14421.4341.805191.194488@ampato.aeccom.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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