Re: vacuum'ing toast crumbs, detecting dangling transactions - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: vacuum'ing toast crumbs, detecting dangling transactions
Date
Msg-id 4AF19E11020000250002C2B0@gw.wicourts.gov
Whole thread Raw
In response to vacuum'ing toast crumbs, detecting dangling transactions  (Dave Crooke <dcrooke@gmail.com>)
List pgsql-performance
Dave Crooke <dcrooke@gmail.com> wrote:

> I'm not defending the decision to store blobs in a database (it was
> taken a while ago, before the need for frequent updates of the XML)
> and it isn't something that can be readily changed at short notice,
> so please no advice about "don't do that" :-)

I wouldn't sweat 50kB chunks of XML.  We store 10MB PDF files.  :-)

> is showing 40-50% dead tuples. However, if I disconnect the app, all
> the dead tuples clean up and moved to the "free space" category.

As you suspected, that sounds like lingering database transactions.
Try looking at the pg_stat_activity table for transactions "IDLE in
transaction".  If you're having trouble pinning down the cause, look
the pg_locks view to see what tables they've been in.

-Kevin

pgsql-performance by date:

Previous
From: Dave Crooke
Date:
Subject: vacuum'ing toast crumbs, detecting dangling transactions
Next
From: Scott Marlowe
Date:
Subject: Re: vacuum'ing toast crumbs, detecting dangling transactions