Not sure whether its worth optimizing, but had spotted this while browsing the code a while back. So thought would post it anyways.
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. Is it very common to have so many attributes in a table ? If not, would it be worth to allocate only as much space as required ? Thanks, Pavan -- EnterpriseDB http://www.enterprisedb.com