Re: [PATCHES] Eliminate more detoast copies for packed varlenas

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: [PATCHES] Eliminate more detoast copies for packed varlenas
Дата
Msg-id 87myupydgo.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: [PATCHES] Eliminate more detoast copies for packed varlenas  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: [PATCHES] Eliminate more detoast copies for packed varlenas  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Gregory Stark" <stark@enterprisedb.com> writes:

> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>
>> (It might be interesting to make textin produce a packed result when
>> possible, just to see what breaks; but I would be afraid to try to do
>> that for production...)
>
> Reassuringly all checks pass with a hack like that in place. (attached)

For the record I've been doing some more testing and found one place that
could be a problem down the road. I'm not sure why it didn't show up
previously. In selfuncs.c we use VARDATA/VARSIZE on data that is taken from
parser Const nodes and from the histogram arrays without detoasting them.

Currently this is safe as array elements are not packed and parser nodes
contain values read using textin and never stored in a tuple. But down the
road I expect we'll want to pack array element so this code would need to
detoast the elements or prepare to handle packed elements.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: andy
Дата:
Сообщение: Re: full text search in 8.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Timezone database changes