Re: TRAP: failed Assert("outerPlan != NULL") in postgres_fdw.c

Etsuro Fujita <etsuro.fujita@gmail.com>

From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, kristianlejao@gmail.com
Date: 2025-09-28T08:55:45Z
Lists: pgsql-bugs
On Fri, Sep 26, 2025 at 10:34 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
> On 2025-Sep-24, Etsuro Fujita wrote:
>
> > I took a quick glance at the patch.  My initial comment is: it only
> > includes the test case discussed here, but I think it's a good idea to
> > add more cases in it (that exercise code paths in
> > postgresRecheckForeignScan), as I mentioned upthread.  What do you
> > think about that?  If no objections, I'd like to update it to include
> > such cases.
>
> I would like to suggest a different approach: because this patch is
> known to fix a server crash in a known case, it would be better to get
> the fix (and its corresponding test) pushed as is without further delay.
> Additional tests are an excellent idea, but I think we shouldn't make
> this patch wait for them.  If further fixes are deemed necessary for
> those other (thus far hypothetical) tests, we can still make them
> afterwards.

The 2-step approach sounds reasonable, so I'll review the proposed
isolation test and report the results first.

Thanks!

Best regards,
Etsuro Fujita