Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers

From: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Nikhil Sontakke <nikkhils(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers
Date: 2011-11-14 16:48:34
Message-ID: CABamaqMtYeRuciHtqQgk47nfFPuUO7XoeuVUjtkfUq0zNEnvKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> If all you need to do is lock a schema, you can just call
> LockDatabaseObject(NamespaceRelationId, namespace_oid, 0,
> AccessShareLock); there's no need to fake up an objectaddress just to
> take a lock. But I think that's not really all you need to do,
> because somebody could drop the namespace between the time that you
> decide what OID to lock and the time you acquire the lock. So I think
> you need something like what we did in RangeVarGetRelid(). See
> attached patch.
>
>
Thanks Robert. But currently there are very few callers of
RangeVarGetAndCheckCreationNamespace() function. For the sake of
completeness we will have to introduce a call to this function while
creating all other objects too.

Regards,
Nikhils

> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emanuel Calvo 2011-11-14 16:54:07 Re: [Feature Request] \dx show "options"
Previous Message Nikhil Sontakke 2011-11-14 16:23:57 Re: So where are we on the open commitfest?