"Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
> The stack usage for toast_insert_or_update() may run into several KBs since
> the MaxHeapAttributeNumber is set to a very large value of 1600. The usage
> could anywhere between 28K to 48K depending on alignment and whether its a
> 32-bit or a 64-bit machine.
So? The routine is not re-entrant so I don't see that the stack space
is a big problem. It's coded that way to avoid palloc/pfree cycles...
regards, tom lane