pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Lepikhov Andrei <a.lepikhov@postgrespro.ru>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: fuboat@outlook.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18077: PostgreSQL server subprocess crashed by a SELECT statement with WITH clause
Date: Wed, 06 Sep 2023 14:14:40 +0700
Message-ID: <620f0695-0d41-4811-aae7-fb8f572114f6@app.fastmail.com> (raw )
In-Reply-To: <CAMbWs481eExv88QMG1p18sFyjRxvLfiiOHA+OoJYssPcx5ap+w@mail.gmail.com >
References: <18077-b9db97c6e0ab45d8@postgresql.org >
<CAMbWs4-4mDc9j5t+d3MbOSFSTqCDAHQKVV8zE8yiwsaXFGHL9Q@mail.gmail.com >
<CAMbWs4_zxFFSy8+6-FG2ZdJc91TQGM+yG0Yh7gydhjTQfb=9fg@mail.gmail.com >
<694541.1693600870@sss.pgh.pa.us >
<CAMbWs49PRmEWmR0BKG-r8Me0kwr1iLo96diFenhtHYGCvcGgvw@mail.gmail.com >
<1237514.1693879473@sss.pgh.pa.us >
<CAMbWs4_i5+xB1WQ5SVOe8SQscaMswx8hbbgA1YKmtAD-vgcxnA@mail.gmail.com >
<3f7bcdb7-c263-4c06-a138-140f5c3898ed@app.fastmail.com >
<CAMbWs481eExv88QMG1p18sFyjRxvLfiiOHA+OoJYssPcx5ap+w@mail.gmail.com >
On Wed, Sep 6, 2023, at 1:55 PM, Richard Guo wrote:
> On Wed, Sep 6, 2023 at 11:40 AM Lepikhov Andrei
> <a.lepikhov@postgrespro.ru> wrote:
>> Hi,
>>
>> I am writing here just because you change this specific part of code.
>> Designing a custom node I found the problem with CTE and Subqueries. The reproduction sample looks quite similar to yours:
>>
>> create view tt24v as
>> with cte as materialized (select r from (values(1,2),(3,4)) r)
>> select (r).column2 as col_a, (rr).column2 as col_b from
>> cte join (select rr from (values(1,7),(3,8)) rr limit 2) ss
>> on (r).column1 = (rr).column1;
>> explain (verbose, costs off) select * from tt24v;
>>
>> but fails with the error "failed to find plan for CTE ..." with a custom node over a JOIN.
>
> The error message indicates that something must have gone wrong. I
> don't know well enough about custom scan, but I cannot reproduce this
> error with your query. Am I missing something?
Yeah, you should design cusom node to reproduce it. I can't publish my current code, but will try to invent a simple example.
--
Regards,
Andrei Lepikhov
view thread (16+ messages) latest in thread
Message-ID: <620f0695-0d41-4811-aae7-fb8f572114f6@app.fastmail.com>
Permalink: ../620f0695-0d41-4811-aae7-fb8f572114f6@app.fastmail.com/
Also on: postgresql.org/message-id/620f0695-0d41-4811-aae7-fb8f572114f6@app.fastmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: a.lepikhov@postgrespro.ru, guofenglinux@gmail.com, tgl@sss.pgh.pa.us, fuboat@outlook.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18077: PostgreSQL server subprocess crashed by a SELECT statement with WITH clause
In-Reply-To: <620f0695-0d41-4811-aae7-fb8f572114f6@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox