Re: [PATCH] Extending pg_class info + more flexible TOAST chunk size

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [PATCH] Extending pg_class info + more flexible TOAST chunk size
Дата
Msg-id 48F311A5.9060809@enterprisedb.com
обсуждение исходный текст
Ответ на Re: [PATCH] Extending pg_class info + more flexible TOAST chunk size  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Ответы Re: [PATCH] Extending pg_class info + more flexible TOAST chunk size  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Список pgsql-hackers
Zdenek Kotala wrote:
> Heikki Linnakangas napsal(a):
>> Not all chunks need to be the same size. We do currently require that, 
>> but AFAICS it's only because that allows random access to a given 
>> offset within a datum. That's of course nice, but I think we could 
>> live without it. 
> 
> Good point. I think it is good to keep this feature.

Yeah. At the moment, it's only used for substring(), I think.

>> Or try random access with the new toast size first, and if the chunks 
>> turn out to be different size, fall back to reading all chunks 
>> sequentially. 
> 
> I think it is not necessary to read it sequentially, only you need to 
> recompute new position.

Yeah, true.

It occurs to me that instead of storing a chunk id, we could store a 
byte offset of the chunk. That would allow random access even if every 
chunk was of different size. You probably don't want any new changes you 
need to deal with in the upgrade, though :-).

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: "Bramandia Ramadhana"
Дата:
Сообщение: Re: Block nested loop join
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Convert check constraints into One-Time_Filter on prepared statements