Re: Useless toast

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Useless toast
Дата
Msg-id 9360d852-7630-4e43-8303-72c5d818fa4f@eisentraut.org
обсуждение исходный текст
Ответ на Useless toast  (Marcos Pegoraro <marcos@f10.com.br>)
Ответы Re: Useless toast
Список pgsql-hackers
On 23.07.24 20:35, Marcos Pegoraro wrote:
> Using version 16, seems strange when toast needs to be created. 
> Tested with domain being numeric or varchar(10) with the same results.
> 
> And If that domain is integer then no toast is created.
> 
> I think none of these tables should have a toast, right ?

The mechanism that determines whether a toast table is needed only 
considers the data type, not the "typmod" (arguments of the data type). 
So this is perhaps suboptimal, but this logic just doesn't exist.

Also, note that varchar(10) means 10 characters, not 10 bytes, so you 
can't necessarily draw conclusions about storage size from that.  There 
aren't any supported character encodings that would encode 10 characters 
into more bytes than the toast threshold, so this is just theoretical, 
but it would be hard to decide what the actual threshold would be in 
practice.




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [18] Policy on IMMUTABLE functions and Unicode updates
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Useless toast