Re: WIP: extensible enums

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: WIP: extensible enums
Дата
Msg-id AANLkTi=VnQV+XhRDSR9WyRyUZCXSrVdC3CTRCzyt6Ag=@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: extensible enums  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP: extensible enums  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WIP: extensible enums
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: WIP: extensible enums