PostgreSQL's MaxAllocSize limit prevents storing individual variable-length character strings exceeding ~1GB, causing
"invalidmemory alloc request size" errors during INSERT operations on tables with large text columns. Example
reproductionincluded in artifacts.md.
This limitation also affects pg_dump when exporting a PostgreSQL database with such data. The attached patches
demonstratesa proof of concept using palloc_extended with MCXT_ALLOC_HUGE in the write path. For the read path, there
area couple of possible approaches: extending existing functions to handle huge allocations, or implementing a chunked
storagemechanism that avoids single large allocations.
Thoughts?
Maxim