Re: Invalid memory alloc request size for repeat() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Invalid memory alloc request size for repeat()
Date
Msg-id 2537857.1653627784@sss.pgh.pa.us
Whole thread Raw
In response to Re: Invalid memory alloc request size for repeat()  (Japin Li <japinli@hotmail.com>)
List pgsql-hackers
Japin Li <japinli@hotmail.com> writes:
> Do those mean we cannot store 1GB to a field [1] and send 1GB of data to the client?

That's what I said upthread.  I'm not terribly excited about that.
Shoving gigabyte-sized field values around as atomic strings is not
going to lead to anything but pain: even if the server can manage
it, clients will likely fall over.  (Try a string a little smaller
than that, and notice how much psql sucks at handling it.)

There's been speculation from time to time about creating some
sort of streaming interface that would allow processing enormous
field values more reasonably.  You can kinda-sorta do that now
with large objects, but those have enough other limitations and
issues that they're not very recommendable as a general solution.
Someone should try to develop a better version of that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: Invalid memory alloc request size for repeat()
Next
From: Peter Smith
Date:
Subject: Re: Handle infinite recursion in logical replication setup