Re: BUG #19484: Segmentation fault triggered by FDW

Etsuro Fujita <etsuro.fujita@gmail.com>

From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Matheus Alcantara <matheusssilv97@gmail.com>, Ayush Tiwari <ayushtiwari.slg01@gmail.com>, Rafia Sabih <rafia.pghackers@gmail.com>, 798604270@qq.com, pgsql-bugs@lists.postgresql.org, Amit Langote <amitlan@postgresql.org>
Date: 2026-06-18T10:55:05Z
Lists: pgsql-bugs
Sorry, I accidentally sent this before I finished writing.

On Thu, Jun 18, 2026 at 7:50 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
>
> Amit-san,
>
> On Thu, Jun 18, 2026 at 6:16 PM Amit Langote <amitlangote09@gmail.com> wrote:
> > A small clarification on this one: the patch makes no changes to
> > postgres_fdw code, only adds a regression test. The bug, which I
> > introduced, is in how nodeModifyTable.c supplies fdw_private from the
> > pruned/validated fdwPrivLists in ModifyTableState rather than the
> > original list in ModifyTable, so the postgres_fdw side itself is
> > unchanged. The substantive change is the executor re-indexing.
>
> Thanks for the clarification!
>
> > Still holding off on committing per our exchange, but no rush given
> > you may want to prioritize the v19 open items. Happy to go ahead
> > whenever, or wait for your comments.

Actually, I've just started reviewing the patch.  I'll let you know
the results (if any) by tomorrow.  Thanks for the consideration as
well.

Best regards,
Etsuro Fujita



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid ABI break in ModifyTableState from the FDW pruning fix

  2. Re-index ModifyTable FDW arrays when pruning result relations

  3. Fix universal builds on MacOS

  4. Track unpruned relids to avoid processing pruned relations