Re: deadlock while doing VACUUM and DROP

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Jan Urbański <j(dot)urbanski(at)students(dot)mimuw(dot)edu(dot)pl>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: deadlock while doing VACUUM and DROP
Date: 2008-05-16 14:14:45
Message-ID: 20080516141445.GC13061@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavan Deolasee escribió:

> >> Also I am not sure if the issue is big enough to demand the change.
> >
> > I think it is, effectively what we have now is "your DDL could fail randomly
> > for reasons that are out of your control" :(
>
> Yeah. I think we better fix this, especially given the above mentioned scenario.

The pg_shdepend code has code to grab a lock on the object being
dropped, which is also grabbed by someone who wants to add a dependency
on the object. Perhaps the pg_depend code should do the same.

I don't think this closes the original report though, unless we ensure
that the lock taken by vacuum conflicts with that one.

--
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 Tom Lane 2008-05-16 14:26:28 Re: Arbitary file size limit in twophase.c
Previous Message Merlin Moncure 2008-05-16 13:28:49 Re: libpq object hooks