Crash on UNION with PG 17

From: "Regina Obe" <lr(at)pcorp(dot)us>
To: "'Postgres hackers'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Crash on UNION with PG 17
Date: 2024-03-27 15:33:55
Message-ID: 014c01da805c$2e679da0$8b36d8e0$@pcorp.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Our PostGIS bot that follows master branch has been crashing for past couple
of days on one of our tests

https://trac.osgeo.org/postgis/ticket/5701

I traced the issue down to this commit:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=66c0185a3d14b
bbf51d0fc9d267093ffec735231

The issue can be exercised without postgis installed as follows:

CREATE TABLE edge_data AS
SELECT i AS edge_id, i + 1 AS start_node, i + 2 As end_node
FROM generate_series(1,10) AS i;

WITH edge AS (
SELECT start_node, end_node
FROM edge_data
WHERE edge_id = 1
)
SELECT start_node id FROM edge UNION
SELECT end_node FROM edge;

If I run using UNION ALL, this works fine:

WITH edge AS (
SELECT start_node, end_node
FROM edge_data
WHERE edge_id = 1
)
SELECT start_node id FROM edge UNION ALL
SELECT end_node FROM edge;

Thanks,
Regina

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-03-27 15:34:57 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
Previous Message Bharath Rupireddy 2024-03-27 15:30:37 Re: Introduce XID age and inactive timeout based replication slot invalidation