Re: Possible bugreport 8.3 beta1 on Win32: Looking like a deadlock with AutoVacuum

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Deblauwe Gino <gino(at)useitgroup(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Possible bugreport 8.3 beta1 on Win32: Looking like a deadlock with AutoVacuum
Date: 2007-10-09 16:52:47
Message-ID: 20071009165247.GA22628@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Deblauwe Gino wrote:
> OS: Windows XP Pro SP2
> CPU: AMD Athlon 64 3500+
> RAM: 2GB
> DB: PostgreSQL 8.3beta1, compiled by Visual C++ build 1400
>
> I've come to the conclusion that it seems like a deadlock occurs when
> dropping a column in a table the same moment that table is autovacuumed.
>
> Example:
>
> ALTER TABLE bondetail DROP COLUMN btw; (user=gino, 16252 records)
> deadlocks with
> VACUUM ANALYZE public.bondetail; (user=postgres)

Does it really deadlock, or is it just locked waiting for the vacuum to
finish?

If it deadlocks you should get a message about it and a transaction
rollback. Otherwise you should be able to see the ungranted lock in
pg_locks.

Also it's not clear if autovacuum is involved, or you invoked the VACUUM
ANALYZE manually. Can you clarify?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-10-09 17:02:38 Re: type money causes unrestorable dump
Previous Message Pavel Stehule 2007-10-09 16:40:23 Re: mal advice in FAQ 4.1.