<paul.malm@lfv.se> writes:
> I get this error when running a SQL statement in my Java application.
> ERROR: Invalid memory alloc request size 1683636507
This is a pretty common symptom of corrupt data (specifically, that the
length word of a variable-length field is garbage). More than that
can't be said with the info you've provided. But I'd be thinking about
"how do I clean up the corruption and prevent a recurrence", not
"I need to increase memory settings".
regards, tom lane