Re: WIP: extensible enums - Mailing list pgsql-hackers

From Robert Haas
Subject Re: WIP: extensible enums
Date
Msg-id 39B6E838-4028-41A3-8C7C-90FCA3D80F79@gmail.com
Whole thread Raw
In response to Re: WIP: extensible enums  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: extensible enums
List pgsql-hackers
On Oct 23, 2010, at 7:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> Latest patch attached.
>
> I've been working through this patch.  It occurs to me that there's a
> fairly serious problem with the current implementation of insertion of
> new values within the bounds of the current sort ordering.  Namely, that
> it does that by reassigning the enumsortorder values of pre-existing
> rows.  That creates a race condition:

It strikes me that this is merely one facet of our failure to do proper locking on DDL objects other than relations,
andthat this would be as good a time as any to start fixing it.  ISTM that ALTER TYPE should grab a self-excluding lock
justas ALTER TABLE already does. 

...Robert

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: create c function with void argument bug?
Next
From: Tom Lane
Date:
Subject: Re: WIP: extensible enums