Re: Pg17 Crash in Planning (Arrays + Casting + UDF)

From: Joe Conway <mail(at)joeconway(dot)com>
To: Paul Ramsey <pramsey(at)cleverelephant(dot)ca>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Regina Obe <lr(at)pcorp(dot)us>, Fredrik Widlert <fredrik(dot)widlert(at)digpro(dot)se>
Subject: Re: Pg17 Crash in Planning (Arrays + Casting + UDF)
Date: 2024-10-09 20:15:03
Message-ID: 455fa1ce-7506-463b-bcf4-32b3f7a37535@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/9/24 14:52, Paul Ramsey wrote:
> Hackers,
>
> This extremely odd case [2] came in via a report using a lot of PostGIS functions, but it can be reconfigured into a pure-PostgreSQL crasher [1].
>
> CREATE TABLE n (i integer);
>
> CREATE OR REPLACE FUNCTION add(integer)
> RETURNS integer
> AS 'SELECT 2 * $1 + 4 * $1'
> LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
>
> SELECT add(array_length(array_agg(i)::numeric[],1)::integer) FROM n;
>
> The stack trace shows it doesn’t get past planning, and in fact it doesn’t care if the table has data in it or not.

I can duplicate the crash on master and 17 stable branches, but not pg16
FWIW. That is as far as I have looked so far.

--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-10-09 20:21:53 Re: Pg17 Crash in Planning (Arrays + Casting + UDF)
Previous Message Nathan Bossart 2024-10-09 19:55:16 sunsetting md5 password support