On Sat, Oct 23, 2010 at 8:11 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> Robert Haas <robertmh...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to