From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Fix flaky push down FUNCTION RTE test
Date: Mon, 24 Aug 2026 16:05:14 +0000
Message-ID: <E1wyXAf-00000001vL8-1h1b@gemulon.postgresql.org> (raw)
postgres_fdw: Fix flaky push down FUNCTION RTE test
The unnest() test introduced in 0ee83dd4a99 did not produce a
deterministic EXPLAIN plan output.
The two sides of this test's nested loop join cost about the same, so
which one ended up as the outer wasn't stable and could flip between
platforms.
Use an equality predicate on ft1.c3 instead of a range one. That
restricts ft1 to a single row, so it's clearly the outer of the nested
loop and the Materialize on the inner side goes away, giving a stable
plan.
Author: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Discussion: https://postgr.es/m/CAA5RZ0uC%3DGOihOKcF7o3JVETF3e-Fkc4OUO5NbqMEKCTeSN-dQ%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0fd1609afe255b275c2560db6db584081a16e8a0
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 24 +++++++++++-------------
contrib/postgres_fdw/sql/postgres_fdw.sql | 8 ++++----
2 files changed, 15 insertions(+), 17 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: postgres_fdw: Fix flaky push down FUNCTION RTE test
In-Reply-To: <E1wyXAf-00000001vL8-1h1b@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox