pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Barvick <sbarvick@comcast.net>
To: pgsql-admin@postgresql.org
Subject: Vacuum doesn't end
Date: Wed, 03 Aug 2005 09:28:22 -0400
Message-ID: <1123075702.3469.14.camel@localhost.localdomain> (raw)


I have an application that may add a couple million rows per day so I
vacuum nightly.  The tables never get to more than about 10 million rows
before I move off the interesting information to other media.  Somewhat
often, my vacuums don't complete as shown from this ps command (usually
VACUUMs take a couple minutes)  

4442 ?        R    949:07 postgres: postgres tag 127.0.0.1(33420) VACUUM

and the CPU for postmaster (hyperthreaded linux) will be in the high
90s.

The locks look like:
scouts=# select * from pg_locks;
 relation | database | transaction |  pid  |           mode           |
granted 
----------+----------+-------------+-------+--------------------------+---------
          |          |    12826125 | 11642 | ExclusiveLock            |
t
    16839 |    17230 |             | 11642 | AccessShareLock          |
t
    17251 |    17230 |             |  4442 | RowExclusiveLock         |
t
    17251 |    17230 |             |  4442 | ShareUpdateExclusiveLock |
t
    17246 |    17230 |             |  4442 | ShareUpdateExclusiveLock |
t
    17246 |    17230 |             |  4442 | ShareUpdateExclusiveLock |
t
          |          |    12817402 |  4442 | ExclusiveLock            |
t
(7 rows)


I all inserts and maintenance through JDBC and may have inserts going on
while a different java thread calls the VACUUM command.

Any thoughts?  Can I recover without dropping the server?

Thanks for any help,
Scott






view thread (3+ messages)  latest in thread

Message-ID: <1123075702.3469.14.camel@localhost.localdomain>
Permalink:  ../1123075702.3469.14.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1123075702.3469.14.camel@localhost.localdomain

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sbarvick@comcast.net
  Subject: Re: Vacuum doesn't end
  In-Reply-To: <1123075702.3469.14.camel@localhost.localdomain>
  References: <1123075702.3469.14.camel@localhost.localdomain>

* 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