Re: BUG #19931: postgres_fdw: FOR UPDATE over a pushed-down join ignores a pseudoconstant qual

From: Nitin Motiani <nitinmotiani(at)google(dot)com>
To: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
Cc: tharakan(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, etsuro(dot)fujita(at)gmail(dot)com, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: BUG #19931: postgres_fdw: FOR UPDATE over a pushed-down join ignores a pseudoconstant qual
Date: 2026-11-27 07:16:43
Message-ID: CAH5HC95tnqDA+Fmz9-beCc61ZtSmrv9dT=BL6Kx3f9t1bCzvFQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks for the review, Matheus. I have created a commitfest entry for
this here https://commitfest.postgresql.org/patch/7737.

On Tue, Nov 24, 2026 at 10:03 PM Matheus Alcantara
<matheusssilv97(at)gmail(dot)com> wrote:
>
> A small comment: I think that the changes on add_foreign_final_paths()
> can be simplified into:
>
> + ForeignPath *fpath;
> +
> + if (IsA(path, ProjectionPath))
> + fpath = (ForeignPath *) ((ProjectionPath *) path)->subpath;
> + else
> + fpath = (ForeignPath *) path;
>
> And then use fpath->fdw_restrictinfo on create_foreign_upper_path().
>
> --

Have made this change. Also added a test for a 3-way join. Attaching
the v2 patch. Please take a look.

Thanks & Regards,
Nitin Motiani
Google

Attachment Content-Type Size
v2-0001-postgres_fdw-Fix-FOR-UPDATE-SHARE-over-a-join-ign.patch application/x-patch 10.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Nitin Motiani 2026-11-27 07:18:54 Re: BUG #19737: Empty `JSON_OBJECT` cannot use documented `ON NULL` or unique-key clauses
Previous Message Tender Wang 2026-11-27 06:10:29 Re: BUG #19942: SIGSEGV crash (and wrong results) in MERGE ... RETURNING WITH (OLD/NEW) with VIRTUAL generated colum