Re: pg_plan_advice

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lukas Fittl <lukas(at)fittl(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_plan_advice
Date: 2026-04-05 12:00:00
Message-ID: fb9796bd-9c22-4588-8979-aa9b8cf1232a@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

05.04.2026 11:00, Alexander Lakhin wrote:
> I and SQLsmith have discovered one more anomaly (reproduced starting from
> e0e4c132e):
> load 'test_plan_advice';
> select object_type from
>  (select object_type from information_schema.element_types limit 1),
>  lateral
>  (select sum(1) over (partition by a) from generate_series(1, 2) g(a) where false);
>
> triggers an internal error:
> ERROR:  XX000: no rtoffset for plan unnamed_subquery
> LOCATION:  pgpa_plan_walker, pgpa_walker.c:110

And another error, which might be interesting to you:
CREATE EXTENSION tsm_system_time;
CREATE TABLE t(i int);
SELECT 1 FROM (SELECT i FROM t TABLESAMPLE system_time (1000)), LATERAL (SELECT i LIMIT 1);

ERROR:  XX000: plan node has no RTIs: 378
LOCATION:  pgpa_build_scan, pgpa_scan.c:200

Best regards,
Alexander

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-04-05 12:04:53 Re: Refactor query normalization into core query jumbling
Previous Message Alvaro Herrera 2026-04-05 11:50:12 Re: Adding REPACK [concurrently]