toast useless - Mailing list pgsql-general

From Marcos Pegoraro
Subject toast useless
Date
Msg-id CAB-JLwbQr60=r=9+bspE0ohDTrAKhU8wZY-oa1U4QtrykviQOg@mail.gmail.com
Whole thread Raw
Responses Re: toast useless
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
Next
From: Simon Riggs
Date:
Subject: Re: toast useless