Re: Underscore in positional parameters?

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Underscore in positional parameters?
Date: 2024-07-02 09:37:45
Message-ID: 7d2950aa-fe6b-4c4f-8b8e-7cb0f05e597f@ewie.name
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2024-07-02 09:39:59 Re: Logical Replication of sequences
Previous Message Dean Rasheed 2024-07-02 09:34:00 Re: Optimize numeric.c mul_var() using the Karatsuba algorithm