Re: How does TOAST compare to other databases' mechanisms?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How does TOAST compare to other databases' mechanisms?
Дата
Msg-id 2485.971540492@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How does TOAST compare to other databases' mechanisms?  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-general
> This sounds fine, but begs the question: if there is TOASTed data in the
> table and the column is set to 'not TOASTed', will TOAST cope? And vice verca?

Yes; the detoasting mechanism doesn't pay any attention to attstorage,
only to what's actually in the stored tuple.  attstorage is only
examined while storing a tuple, and it's really only advisory anyway
(see tuptoaster.c).  The only "must" involved here is that you must not
set attstorage to anything but 'p' for a non-toastable data type; which
you determine by checking the type's pg_type entry (typstorage != 'p'
means toastable).

>> All told it might be a couple
>> hundred lines of new or changed code.  Pretty much all of this could
>> be done by cribbing from existing code (ie. programming-by-example)
>> which is a good thing because there's not much documentation.

> So it might be worh documenting, too...

Yes, if you wanted to keep notes and work them up into documentation
for future hackers, that'd be a nice side benefit.

            regards, tom lane

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: config
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgresql 7 does not always start on RH 6.2