Antonin Houska <ah@cybertec.at> wrote:
> shihao zhong <zhong950419@gmail.com> wrote:
>
> > It can also make REPACK fail. If the columns that are left need no
> > TOAST table, the new heap has none, and on master I get:
> >
> > ERROR: row is too big: size 16424, maximum size 8160
>
> Can you please be more specific about this? I don't understand why the new
> heap has no TOAST relation in such a case. Perhaps a bug in see
> heapam_relation_needs_toast_table()? I'm not sure it should return here,
> regardless the tuple size.
>
> if (!has_toastable_attrs)
> return false; /* nothing to toast? */
I could reproduce error like this independently from REPACK - see the scripts
attached. However, I realize that it does not help to remove this part from
heapam_relation_needs_toast_table(): it would only enforce creation of the
TOAST table if all the attributes had storage TYPSTORAGE_PLAIN, but such
attributes cannot be TOASTed anyway.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com