Re: Underscore in positional parameters? - Mailing list pgsql-hackers

From Erik Wienhold
Subject Re: Underscore in positional parameters?
Date
Msg-id b4b9e8b8-34f0-4442-90c8-0a65a3e4d5e2@ewie.name
Whole thread Raw
In response to Re: Underscore in positional parameters?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2024-07-02 16:21 +0200, Tom Lane wrote:
> Erik Wienhold <ewie@ewie.name> writes:
> > On 2024-07-02 10:45 +0200, Peter Eisentraut wrote:
> >> I had to revert the test case from the 0002 patch.  It ended up running some
> >> build farm machines out of memory.
> 
> >> +ERROR:  out of memory
> >> +DETAIL:  Failed on request of size 1073741820 in memory context "PortalContext".
> 
> > That means paramno is less than MaxAllocSize/sizeof(Oid) if it tries to
> > allocate memory.  MaxAllocSize is always 0x3fffffff.  Is sizeof(Oid)
> > less than 4 on those machines?
> 
> No.  Y'know, it's not really *that* astonishing for a machine to not
> have a spare 1GB of RAM available on-demand.  This test would
> certainly have failed on our 32-bit animals, although it doesn't
> look like any of them had gotten to it yet.

Ah, sorry.  I somehow missed that it allocates memory for each param,
instead of first checking *all* params.  m(

-- 
Erik



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: [PATCH] Add min/max aggregate functions to BYTEA
Next
From: Tomas Vondra
Date:
Subject: Re: Make query cancellation keys longer