toast useless

Поиск
Список
Период
Сортировка
От Marcos Pegoraro
Тема toast useless
Дата
Msg-id CAB-JLwbQr60=r=9+bspE0ohDTrAKhU8wZY-oa1U4QtrykviQOg@mail.gmail.com
обсуждение исходный текст
Ответы Re: toast useless  (Simon Riggs <simon.riggs@enterprisedb.com>)
Список pgsql-general
create table test(x integer, y integer, w varchar(50), z varchar(80));
When a table has well defined sizes all their data is stored on heap, so they doesn´t need to be toasted, and no toast table is created. Fine.

But then I want to store last modification of that record, so I do ...
alter table test add audit_last_record jsonb;
And a trigger to store old.* on that field.

So I'm sure that jsonb will fit on heap too because their size is all other fields converted to jsonb, never bigger than that.

But as soon as I´ve created that field, a toast table is created too. Even if I set storage MAIN to that field, reltoastrelid on pg_class still exists.

alter table test alter audit_last_record SET STORAGE MAIN

So, there is a way to eliminate these useless toast tables ?

thanks 
Marcos

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: toast useless