pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Plotkin <richard@richardplotkin.com>
To: pgsql-performance@postgresql.org
Subject: Disk filling, CPU filling, renegade inserts and deletes?
Date: Wed, 20 Apr 2005 12:28:45 -0700
Message-ID: <6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com> (raw)

Hi,

I'm having a pretty serious problem with postgresql's performance.  
Currently, I have a cron task that is set to restart and vacuumdb -faz 
every six hours.  If that doesn't happen, the disk goes from 10% full 
to 95% full within 2 days (and it's a 90GB disk...with the database 
being a 2MB download after dump), and the CPU goes from running at 
around a 2% load to a 99+% load right away (the stats look like a 
square wave).

So it's problem-hunting time, I guess.  The problem has something to do 
with the following errors (there are a lot; I'm posting a short sample)
NOTICE:  relation "pg_depend" TID 43/27: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_depend" TID 43/28: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_depend" TID 43/29: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_depend" TID 43/30: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_depend" TID 43/31: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_depend" TID 43/32: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_type" TID 17/44: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_type" TID 17/45: InsertTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/11: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/12: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/13: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/14: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/15: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/16: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_attribute" TID 133/17: 
InsertTransactionInProgress 209545 --- can't shrink relation
NOTICE:  relation "pg_class" TID 41/18: DeleteTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_class" TID 41/19: DeleteTransactionInProgress 
209545 --- can't shrink relation
NOTICE:  relation "pg_class" TID 41/20: DeleteTransactionInProgress 
209545 --- can't shrink relation

When I vacuum full, I can't get rid of these errors unless I restart 
the database (and then I restart, vacuum full, and everything's fine).  
And once I do a successful vacuum full, CPU usage returns to normal, 
and the disk is no longer almost full (back to 10% full). I'm at a loss 
to figure out where the problem is coming from and how to fix it.

My machine: XServe G5 Dual 2GHz running Mac OS X Server 10.3.9.  
Postgresql 8.0.1

Thanks for any responses/ideas/solutions (best of all!),
Richard




view thread (18+ messages)  latest in thread

Message-ID: <6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com>
Permalink:  ../6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com/
Also on:    postgresql.org/message-id/6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: richard@richardplotkin.com
  Subject: Re: Disk filling, CPU filling, renegade inserts and deletes?
  In-Reply-To: <6f4567d4e64297b356e2d71ec392cdae@richardplotkin.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox