Re: Vacuum full hang

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Vacuum full hang
Date: 2003-02-02 17:46:34
Message-ID: 12259.1044207994@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Gaetano Mendola" <mendola(at)bigfoot(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Marc G. Fournier 2003-02-03 02:15:59 Re: Fwd: Postfix SMTP server: errors from
Previous Message Tom Lane 2003-02-02 17:39:00 Re: pg_restore and the use of encryption