| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tender Wang <tndrwang(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, Jacob Brazeal <jacob(dot)brazeal(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: remove_useless_joins vs. bug #19560 |
| Date: | 2026-09-16 05:16:20 |
| Message-ID: | CAHGQGwGZBZmb7Yq+UTT0Lp5wvztQZtMT94ehcMHQs9Dk6jaaXQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Sep 16, 2026 at 9:39 AM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> Thanks for the report! I expected some fallout from this commit,
> though I didn't expect them quite so soon :-)
>
> I'll take a look.
Thanks!
And, here's another related issue, though it seems to have been introduced by
commit 2ebf25e7d70.
CREATE TABLE t(a integer PRIMARY KEY);
EXPLAIN (COSTS OFF)
SELECT u.c2
FROM (
SELECT CASE WHEN false THEN r.a END AS c
FROM t l LEFT JOIN t r ON l.a = r.a
) s
RIGHT JOIN t b ON true
CROSS JOIN LATERAL (
SELECT (SELECT s.c) AS c2
UNION ALL
SELECT (SELECT s.c)
) u;
TRAP: failed Assert("context->new_index != INVALID_VAR"), File:
"rewriteManip.c", Line: 566, PID: 6615
0 postgres 0x0000000104f38ee2
ExceptionalCondition + 178
1 postgres 0x0000000104c92fec
ChangeVarNodes_walker + 124
2 postgres 0x0000000104ad9986
expression_tree_walker_impl + 1654
3 postgres 0x0000000104c93448
ChangeVarNodes_walker + 1240
4 postgres 0x0000000104ada53d
expression_tree_walker_impl + 4653
5 postgres 0x0000000104c93448
ChangeVarNodes_walker + 1240
6 postgres 0x0000000104ada222
expression_tree_walker_impl + 3858
7 postgres 0x0000000104ad971a
expression_tree_walker_impl + 1034
8 postgres 0x0000000104c93448
ChangeVarNodes_walker + 1240
9 postgres 0x0000000104ada222
expression_tree_walker_impl + 3858
10 postgres 0x0000000104ada5a2
expression_tree_walker_impl + 4754
11 postgres 0x0000000104c93448
ChangeVarNodes_walker + 1240
12 postgres 0x0000000104ada222
expression_tree_walker_impl + 3858
13 postgres 0x0000000104c93448
ChangeVarNodes_walker + 1240
14 postgres 0x0000000104c92f5e ChangeVarNodes + 494
15 postgres 0x0000000104b73a74
remove_rels_from_query_tree + 132
16 postgres 0x0000000104b73409
remove_useless_outer_joins + 457
17 postgres 0x0000000104b8c1b3 query_planner + 1123
18 postgres 0x0000000104b8f749
grouping_planner + 1209
19 postgres 0x0000000104b8e775
subquery_planner + 4933
20 postgres 0x0000000104b8c911
standard_planner + 1201
21 postgres 0x0000000104b8c43f planner + 95
22 postgres 0x0000000104d20854 pg_plan_query + 132
23 postgres 0x000000010492fef6
standard_ExplainOneQuery + 214
24 postgres 0x000000010492fc16 ExplainOneQuery + 182
25 postgres 0x000000010492f998 ExplainQuery + 376
26 postgres 0x0000000104d2b43f
standard_ProcessUtility + 2159
27 postgres 0x0000000104d2abc9 ProcessUtility + 313
28 postgres 0x0000000104d2a3dc
PortalRunUtility + 236
29 postgres 0x0000000104d2909e FillPortalStore + 238
30 postgres 0x0000000104d28c71 PortalRun + 641
31 postgres 0x0000000104d23d58
exec_simple_query + 1400
32 postgres 0x0000000104d22e95 PostgresMain + 2981
33 postgres 0x0000000104d1b9d8 BackendMain + 168
34 postgres 0x0000000104c09429
postmaster_child_launch + 377
35 postgres 0x0000000104c0f9d5 BackendStartup + 277
36 postgres 0x0000000104c0df45 ServerLoop + 341
37 postgres 0x0000000104c0cd49 PostmasterMain + 5753
38 postgres 0x0000000104aa5dd3 main + 771
39 dyld 0x00007ff810660530 start + 3056
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-09-16 05:17:37 | Re: Refactor code around GUC default_toast_compression |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-09-16 05:01:24 | RE: [PATCH] Explain what the default output_plugin_libraries do |