]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_plan_advice: Don't generate FOREIGN_JOIN advice for a single relation.
authorRobert Haas <rhaas@postgresql.org>
Thu, 2 Jul 2026 19:45:22 +0000 (15:45 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 2 Jul 2026 19:45:22 +0000 (15:45 -0400)
commit53e6f51eef55e8e4520901e40b4d143d944358c0
treecc83a4bb73225c152d5edf76fc73ba6ac74de411
parent9ef89fdb61046d0687e92ecea8035caef8a753c0
pg_plan_advice: Don't generate FOREIGN_JOIN advice for a single relation.

A foreign scan can target a single relation while still reaching the
fs_relids branch of pgpa_build_scan() -- for example, when postgres_fdw
pushes an aggregate down over one foreign table. In that case, no
advice should be emitted.

Author: Mahendra Singh Thalor <mahi6run@gmail.com>
Co-authored-by: Robert Haas <rhaas@postgresql.org>
Discussion: http://postgr.es/m/CAKYtNAofuAJBz6++SeikpCb=Y=MO1QgEuZNJ+KZOP2johF1r4Q@mail.gmail.com
contrib/pg_plan_advice/Makefile
contrib/pg_plan_advice/meson.build
contrib/pg_plan_advice/pgpa_scan.c
contrib/pg_plan_advice/t/001_foreign_scan.pl [new file with mode: 0644]