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