Re: extensible enum types

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: extensible enum types
Дата
Msg-id AANLkTikGvSO81dbMWIACBJzt2qa2AgkKZhgZigXMe4zc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: extensible enum types  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Sat, Jun 19, 2010 at 4:55 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> Gurjeet Singh wrote:
>>
>>
>> This is very similar to Andrew's original suggestion of splitting 32 bits
>> into 16+16, but managed by the machine hence no complicated comparison algos
>> needed on our part. Also, since this is all transparent to the SQL
>> interface, our dump-reload cycle or Slony replication, etc. should not be
>> affected either.
>>
>>
>
> It would break the on-disk representation, though. That's not something we
> want to do any more if it can possibly be avoided. We want to keep
> pg_upgrade working.

I was partial to your original idea -- i thought it was quite clever
actually.  enums are a performance side of a tradeoff already so I
think any improvement for them should be looked at through that lens.

16 bits is IMO enough to pick a reasonable bucket size that gives you
enough play to handle the vast majority of cases that are appropriate
for enums.  your workaround in the rare case you actually hit the
limitations (most of these would fall under the 'oops, i used the
wrong tool' category) seems perfectly ok imo.

merlin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: extensible enum types
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: beta3 & the open items list