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

From Erik Wienhold
Subject Re: Underscore in positional parameters?
Date
Msg-id 7d2950aa-fe6b-4c4f-8b8e-7cb0f05e597f@ewie.name
Whole thread Raw
In response to Re: Underscore in positional parameters?  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Underscore in positional parameters?
List pgsql-hackers
On 2024-07-02 10:45 +0200, Peter Eisentraut wrote:
> On 02.07.24 10:14, Peter Eisentraut wrote:
> > I have committed your two v4 patches.
> 
> I had to revert the test case from the 0002 patch.  It ended up running some
> build farm machines out of memory.

dhole, morepork, and schnauzer.  For example, schnauzer[1]:

> diff -U3 /home/pgbf/buildroot/HEAD/pgsql.build/src/test/regress/expected/prepare.out
/home/pgbf/buildroot/HEAD/pgsql.build/src/test/regress/results/prepare.out
> --- /home/pgbf/buildroot/HEAD/pgsql.build/src/test/regress/expected/prepare.out    Tue Jul  2 10:31:34 2024
> +++ /home/pgbf/buildroot/HEAD/pgsql.build/src/test/regress/results/prepare.out    Tue Jul  2 10:33:15 2024
> @@ -186,9 +186,8 @@
> 
>  -- max parameter number and one above
>  PREPARE q9 AS SELECT $268435455, $268435456;
> -ERROR:  there is no parameter $268435456
> -LINE 1: PREPARE q9 AS SELECT $268435455, $268435456;
> -                                         ^
> +ERROR:  out of memory
> +DETAIL:  Failed on request of size 1073741820 in memory context "PortalContext".
>  -- test DEALLOCATE ALL;
>  DEALLOCATE ALL;
>  SELECT name, statement, parameter_types FROM pg_prepared_statements

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?

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=schnauzer&dt=2024-07-02%2008%3A31%3A34

-- 
Erik



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Optimize numeric.c mul_var() using the Karatsuba algorithm
Next
From: vignesh C
Date:
Subject: Re: Logical Replication of sequences