Re: TOAST condition for column size

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TOAST condition for column size
Дата
Msg-id 479998.1611070839@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TOAST condition for column size  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: TOAST condition for column size  (torikoshia <torikoshia@oss.nttdata.com>)
Список pgsql-hackers
Dilip Kumar <dilipbalaut@gmail.com> writes:
> On Tue, 19 Jan 2021 at 6:28 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Won't it be safe because we don't align individual attrs of type
>> varchar where length is less than equal to 127?

> Yeah right,  I just missed that point.

Yeah, the minimum on biggest_size has nothing to do with alignment
decisions.  It's just a filter to decide whether it's worth trying
to toast anything.

Having said that, I'm pretty skeptical of this patch: I think its
most likely real-world effect is going to be to waste cycles (and
create TOAST-table bloat) on the way to failing anyway.  I do not
think that toasting a 20-byte field down to 18 bytes is likely to be
a productive thing to do in typical situations.  The given example
looks like a cherry-picked edge case rather than a useful case to
worry about.

IOW, if I were asked to review whether the current minimum is
well-chosen, I'd be wondering if we should increase it not
decrease it.

            regards, tom lane



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

Предыдущее
От: James Hilliard
Дата:
Сообщение: Re: [PATCH 1/1] Fix detection of pwritev support for OSX.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Use boolean array for nulls parameters