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

From Robert Haas
Subject Re: WIP: extensible enums
Date
Msg-id AANLkTi=VnQV+XhRDSR9WyRyUZCXSrVdC3CTRCzyt6Ag=@mail.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 Sat, Oct 23, 2010 at 8:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> Why would you need to lock out type comparisons?
>
> Didn't you get the point?  The hazard is to a concurrent process that is
> merely trying to load up its enum-values cache so that it can perform an
> enum comparison.  I don't want such an operation to have to block,
> especially not against something that's trying to acquire a more or less
> exclusive lock.

Hmm, yeah, I missed the point.  Sorry.

I suppose you could fix this by always updating every row, and storing
in each row the total count of elements (or a random number).  Then
it'd be obvious if you'd read an inconsistent view of the world.

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP: extensible enums
Next
From: Andrew Dunstan
Date:
Subject: Re: WIP: extensible enums