Re: Persistent dead rows - Mailing list pgsql-general

From Malcolm McLean
Subject Re: Persistent dead rows
Date
Msg-id 3823FE6BD7EA064C961B2559C9FED9345DE7CA@zaidsexch001.interpharm.com
Whole thread Raw
In response to Re: Persistent dead rows  (Richard Huxton <dev@archonet.com>)
Responses Re: Persistent dead rows  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton wrote:
>> What is causing those dead rows to not get cleared even by a full
>> vacuum? Is there any way keep them low without having to run a
cluster
>> command as that is a locking statement and requires me to close all
java
>> applications that are connecting to that table before running the
>> cluster.
>
> Aha! I'll bet your java app (or something in the stack) is issuing a
> BEGIN and just sitting there. Try disconnecting the apps and seeing if

> vacuum recovers rows then. If so, you'll need to get your java code to

> stop sitting on open transactions.

I tested this theory by stopping java applications that were connected
to the database and all other connections that were using transactions
and the full vacuum was still unable to remove the dead rows.

What I'm still wondering about, is why the dead row count rises
incredibly high, then all of a sudden drops to 0 again when the java
apps never stop running.

Malcolm

--
   Richard Huxton
   Archonet Ltd
This information is intended only for the person or entity to which it is addressed and may contain private,
confidential,proprietary and/or privileged material and may be subject to confidentiality agreements. If you are not
theintended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is
strictlyprohibited. If you have received this e-mail in error, please notify us immediately by return email or
telephone+27 12 673-1400 and destroy the original message.  

Any review, retransmission, dissemination, or any other use of or taking of any action in reliance upon this
information,by persons or entities other than the intended recipient, is prohibited.  

The company is neither liable for proper, complete transmission of the information contained in this communication, any
delayin its receipt or that the mail is virus-free. 

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Persistent dead rows
Next
From: Ged
Date:
Subject: Array OUT columns in a record returned from a function - part deux