Re: Hanging VACUUM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hanging VACUUM
Date
Msg-id 21999.990854799@sss.pgh.pa.us
Whole thread Raw
In response to Hanging VACUUM  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I just noticed that if I do BEGIN;CREATE TABLE..., and then start VACUUM
> of the database in another psql session, the VACUUM hangs until the
> transaction completes.  Is this expected?

Sure.  You have a write lock on pg_class ... not to mention a few other
system tables, but that's the one this trace shows VACUUM is waiting for
exclusive lock on:

> #5  0x811b67a in LockRelation (relation=0x826b01c, lockmode=7) at lmgr.c:141
> #6  0x80735c5 in heap_open (relationId=1259, lockmode=7) at heapam.c:596
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Hanging VACUUM
Next
From: Oleg Bartunov
Date:
Subject: First version of multi-key index support for GiST