pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Vacuum full hang
Date: Sun, 02 Feb 2003 12:46:34 -0500
Message-ID: <12259.1044207994@sss.pgh.pa.us> (raw)
In-Reply-To: <b1j5jl$2qbt$1@news.hub.org>
References: <b1j5jl$2qbt$1@news.hub.org>

"Gaetano Mendola" <mendola@bigfoot.com> writes:
> I'm trying to vacuum full a table ( Postgres 7.2.3 )
> but the command:
> vacuum full <my_table>
> hang and all processes that are trying to update that table hang too,
> the CPU occupation for the process that perform the
> vacuum is 0. What is going on?

Are you sure it's actually hung, and not busy doing the vacuum?  Vacuum
is generally I/O bound not CPU bound, so I place little faith in using
the CPU idle time to decide that it's not doing anything.

If it *is* waiting, the reason is probably that some other process has a
lock on the table and is failing to commit its transaction and release
the lock.  The vacuum will be queued up waiting to get exclusive lock
--- and everything else that might want to access the table will queue
up behind the vacuum.

In 7.3 you could look at the pg_locks view to confirm that idea, but
in 7.2 you can't do much more than look at ps to see if there are any
"idle in transaction" processes.  Those would be the most likely
culprits to be sitting on locks.

			regards, tom lane



view thread (5+ messages)

Message-ID: <12259.1044207994@sss.pgh.pa.us>
Permalink:  ../12259.1044207994@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12259.1044207994@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, mendola@bigfoot.com
  Subject: Re: Vacuum full hang
  In-Reply-To: <12259.1044207994@sss.pgh.pa.us>
  References: <b1j5jl$2qbt$1@news.hub.org> <12259.1044207994@sss.pgh.pa.us>

* 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