Re: TRAP: failed Assert("outerPlan != NULL") in postgres_fdw.c
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
kristianlejao@gmail.com
Date: 2025-10-03T21:21:16Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix EvalPlanQual handling of foreign/custom joins in ExecScanFetch.
- 24e74b9621e4 14.20 landed
- 12b0c0e51b2f 13.23 landed
- 4a08603a2322 15.15 landed
- 5a9af48689dc 16.11 landed
- 2bb84ea7ef89 17.7 landed
- b14144325984 18.1 landed
- 12609fbacb00 19 (unreleased) landed
Attachments
- v5-0001-postgres_fdw-Fix-assertion-failure-when-EvalPlanQ.patch (application/octet-stream) patch v5-0001
On Fri, Oct 3, 2025 at 4:00 AM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
>
> On Fri, Oct 3, 2025 at 7:21 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > I've updated the patch based on your comments. Please find the attached patch.
>
> Thanks for updating the patch!
>
> +step "s1_tuplock" {
> + EXPLAIN (COSTS OFF, ANALYZE ON, TIMING OFF, SUMMARY OFF, BUFFERS OFF)
> + SELECT a.i,
> + (SELECT 1 FROM fb, fc WHERE a.i = fb.i AND fb.i = fc.i)
> + FROM a as a
> + FOR UPDATE;
> +}
>
> Maybe my comment about this step was not enough, but I'm wondering we
> should run EXPLAIN and then SELECT here like below, rather than
> running EXPLAIN ANALYZE, as that seems more usual to me:
>
> step "s1_tuplock" {
> EXPLAIN (VERBOSE, COSTS OFF)
> SELECT a.i,
> (SELECT 1 FROM fb, fc WHERE a.i = fb.i AND fb.i = fc.i)
> FROM a
> FOR UPDATE;
> SELECT a.i,
> (SELECT 1 FROM fb, fc WHERE a.i = fb.i AND fb.i = fc.i)
> FROM a
> FOR UPDATE;
> }
>
> I added the VERBOSE option to show the remote query, and removed the
> alias for a.
Done.
> BTW: you added quotation marks around a name for each session or step
> like "s1_tuplock". Do we really need them? This is nitpicking,
> though.
No, I brought a convention from other spec files. I've unquoted all
sessions and steps.
I've attached the updated patch that dealt with all comments including
ones Michael-san made[1].
Regards,
[1] https://www.postgresql.org/message-id/aN8fYwIw0p7ZMYGA%40paquier.xyz
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com