Re: BUG #3833: Index remains when table is dropped

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3833: Index remains when table is dropped
Date: 2008-03-06 21:32:20
Message-ID: 200803062132.m26LWLN27673@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Mark Kirkwood wrote:
> I encountered this bug recently - and thought I'd have a try at seeing
> what might fix it.
>
> Taking an exclusive lock on the to-be-dropped table immediately (i.e in
> RemoveRel) seems to be enough to prevent the drop starting while an
> index is being created in another session. So it "fixes" the issue -
> possible objections that I can think of are:
>
> 1/ Not a general solution to multi session dependent drop/create of
> objects other than tables (unless we do 2/)
> 2/ Using this approach in all object dropping code may result in
> deadlocks (but is this worse than dangling/mangled objects?)
>
> Now, I'm conscious that there could be other show stopper reasons for
> *not* doing this that I have not thought of, but figured I'd post in
> case the idea was useful. Thoughts?
>
> Cheers
>
> Mark

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2008-03-06 21:38:35 Re: BUG #3839: LDAP authentification and password with "space"-symbol
Previous Message Bruce Momjian 2008-03-06 21:29:51 Re: pg_dump produces invalid SQL for "group by cast(null as numeric)"