pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
9+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2026-11-04 b6178c942e  Allow LIMIT pushdown in postgres_fdw with empty ORDER BY pathkeys
  2026-11-04 4b1abd6782 d6694976c8 edbb281374 52b41da0be  Fix incorrect Assert in add_foreign_ordered_paths
* BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
@ 2026-11-02 15:43 PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: PG Bug reporting form @ 2026-11-02 15:43 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: tharakan@gmail.com

The following bug has been logged on the website:

Bug reference:      19827
Logged by:          Robins Tharakan
Email address:      tharakan@gmail.com
PostgreSQL version: 19rc1
Operating system:   Debian 13 (x86_64)
Description:        

A set-operation input that scans a postgres_fdw foreign table and has
an ORDER BY whose keys are all redundant (a constant, or a column the
WHERE clause equates to a constant) fails this assertion:

  TRAP: failed Assert("root->query_pathkeys == root->sort_pathkeys"),
  File: "postgres_fdw.c", Line: 8280

Release builds return correct rows (checked against the local table).

add_foreign_ordered_paths() asserts that query_pathkeys is
sort_pathkeys for a base or join rel. Since 66c0185a3,
standard_qp_callback() falls back to setop_pathkeys when sort_pathkeys
is NIL, for an input of a set operation. A redundant ORDER BY leaves
sort_pathkeys NIL while the query still has a sortClause, so
create_ordered_paths() still calls the FDW for UPPERREL_ORDERED.

It fails on master and REL_17_STABLE to REL_19_STABLE; 16 has no
setop_pathkeys. On 17 only UNION inputs trip it; from 18 EXCEPT does
too (and INTERSECT, tried on master). A patch follows in a reply.

SQL
===
CREATE EXTENSION postgres_fdw;
DO $$
BEGIN
  EXECUTE format('CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw
                    OPTIONS (dbname %L, port %L)',
                 current_database(), current_setting('port'));
END
$$;
CREATE USER MAPPING FOR CURRENT_USER SERVER loopback;
CREATE TABLE t (a int, b bool);
INSERT INTO t VALUES (1, true), (2, false);
CREATE FOREIGN TABLE ft (a int, b bool)
  SERVER loopback OPTIONS (table_name 't');

(SELECT a, b FROM ft WHERE a = 1 ORDER BY a) UNION (SELECT 2, true);

-- from 18, also:
(SELECT 1 AS x, b FROM ft ORDER BY 1) EXCEPT (SELECT 1, true);

Commit
======
6cda9dfc4f97 (master) — fails here
Reproduced starting from 12933dc6048, a re-commit of 66c0185a3.
Built with --enable-cassert and -O2 (gcc 14.2, Debian 13, x86_64).

Backtrace
=========
#4  add_foreign_ordered_paths (...) at postgres_fdw.c:8280
#5  postgresGetForeignUpperPaths (root=..., stage=UPPERREL_ORDERED, ...)
    at postgres_fdw.c:8119
#6  create_ordered_paths (...) at planner.c:5784
#7  grouping_planner (...) at planner.c:2160
#8  subquery_planner (..., plan_name="setop_1", ...) at planner.c:1367
#9  recurse_set_operations (...) at prepunion.c:252
#10 generate_nonunion_paths (...) at prepunion.c:1091
#11 recurse_set_operations (...) at prepunion.c:287
#12 plan_set_operations (root=...) at prepunion.c:164
(EXCEPT case; UNION goes through generate_union_paths)

Patch
=====
The patch (in a reply to this report), is against master 6cda9dfc4f97,
and applies through to REL_17_STABLE. In add_foreign_ordered_paths(),
the base/join branch now handles the set-operation case first:

+               if (root->query_pathkeys != root->sort_pathkeys)
+               {
+                       Assert(root->sort_pathkeys == NIL &&
+                                  root->query_pathkeys ==
root->setop_pathkeys);
+                       fpinfo->pushdown_safe = true;
+                       return;
+               }

Why that patch looks correct:
- For a base or join rel, query_pathkeys can differ from sort_pathkeys
  only through the setop_pathkeys fallback: GROUP BY, window functions
  or DISTINCT would make the ordered stage's input an upper rel. The
  new Assert checks that.
- With sort_pathkeys NIL there's no final sort, so the ordered rel is
  safe to push down, as the grouping-rel path below already decides
  when sort_pathkeys is NIL.
- Release builds took pushdown_safe from qp_is_pushdown_safe, computed
  for setop_pathkeys, so a LIMIT in the input was pushed down only if
  the set operation's order could be. Results were right either way.
  The one plan change: such an input with a LIMIT whose set-operation
  order can't be shipped now pushes the LIMIT down without ORDER BY,
  which is fine since every row ties on the redundant keys.
- A top-level query with an all-redundant ORDER BY is unchanged:
  query_pathkeys is NIL there too.

The test adds five queries to postgres_fdw.sql: UNION inputs over a
base rel, over a join and with a LIMIT, an EXCEPT input and an
INTERSECT input. They check rows, not plans, so one expected output
fits every branch.

To keep back-branch plans exactly as they are, set pushdown_safe from
qp_is_pushdown_safe in the new block instead; it's a one-line change.

Testing
=======
On the tips of master (6cda9dfc4f97), REL_19_STABLE (4942dc745cf1),
REL_18_STABLE (19a2002b5db9) and REL_17_STABLE (9c44922d125c), with
assertions: the patch applies and compiles with no warning in
postgres_fdw.c, the core regression tests and postgres_fdw's pass, and
with the postgres_fdw.c change reverted, the new test hits this
assertion.

By hand, plans match an unpatched release build's except in that one
case. For

  (SELECT a, b::text COLLATE "C" AS c FROM ft
   WHERE a = 1 ORDER BY a LIMIT 1) UNION (SELECT 2, 'x');

the patched build sends

  SELECT a, b FROM public.t WHERE ((a = 1)) LIMIT 1::bigint

where the unpatched build applies the LIMIT locally. The rows are the
same.

Found using SQLsmith and Claude.

-
Robins Tharakan
https://robins.in







^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
@ 2026-11-02 16:08 ` Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Robins Tharakan @ 2026-11-02 16:08 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: David Rowley <dgrowleyml@gmail.com>; Etsuro Fujita <etsuro.fujita@gmail.com>

Hi,

> It fails on master and REL_17_STABLE to REL_19_STABLE; 16 has no
> setop_pathkeys. On 17 only UNION inputs trip it; from 18 EXCEPT does
> too (and INTERSECT, tried on master). A patch follows in a reply.
>
> The patch (in a reply to this report), is against master 6cda9dfc4f97,
> and applies through to REL_17_STABLE. In add_foreign_ordered_paths(),
> the base/join branch now handles the set-operation case first:


Here's the patch that fixes the issue.
It applies from HEAD through REL_17_STABLE. make check passes too.

-
robins | robins.in

Attachments:

  repro.sql (application/octet-stream, 865B) download

v1-0001-postgres_fdw-Fix-assertion-with-redundant-ORDER-BY-in-set-op-input.patch (application/octet-stream, 5.5K) download From 084036113756fd8e75ccc43e7e2c3b8d641fcc33 Mon Sep 17 00:00:00 2001 From: Robins Tharakan <tharakan@gmail.com> Date: Sat, 31 Oct 2026 20:08:49 +1030 Subject: [PATCH v1] postgres_fdw: Fix assertion with redundant ORDER BY in set-op input add_foreign_ordered_paths() assumed that for a base or join relation, query_pathkeys is the same list as sort_pathkeys, because standard_qp_callback() sets it so whenever there is an ORDER BY to do. Since commit 12933dc6048, standard_qp_callback() instead falls back to setop_pathkeys when sort_pathkeys is NIL, for a subquery planned as an input of a set operation. An ORDER BY whose keys are all redundant (constants, or columns that the WHERE clause equates to constants) leaves sort_pathkeys NIL while the query still has a sortClause, so create_ordered_paths() still calls the FDW for UPPERREL_ORDERED, and the assertion failed: (SELECT a, b FROM ft WHERE a = 1 ORDER BY a) UNION (SELECT 2, true); From v18, inputs of EXCEPT and INTERSECT are affected too, since those set operations can now use presorted input. Non-assert builds returned correct results, but they set the ordered relation's pushdown_safe from qp_is_pushdown_safe, which was computed for setop_pathkeys rather than for the (empty) final sort. So whether a LIMIT in such a subquery could be pushed down depended on whether the set operation's sort order could be shipped. Fix by handling that case first: with no final sort to do, the ordered relation is safe to push down, as it already is for a grouping relation whose ORDER BY keys are all redundant. The assertion now checks that this is the only way query_pathkeys can differ from sort_pathkeys here. Backpatch-through: 17 --- .../postgres_fdw/expected/postgres_fdw.out | 37 +++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 17 ++++++++- contrib/postgres_fdw/sql/postgres_fdw.sql | 9 +++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index 115ebc7..2bfd481 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -1382,6 +1382,43 @@ SELECT * FROM ( Remote SQL: SELECT "C 1" FROM "S 1"."T 1" (8 rows) +-- A set operation's input whose ORDER BY keys are all redundant has no sort +-- to push down, though query_pathkeys holds the set operation's pathkeys. +(SELECT c1, c2 FROM ft1 WHERE c1 = 1 ORDER BY c1) UNION (SELECT 2, 3) ORDER BY 1; + c1 | c2 +----+---- + 1 | 1 + 2 | 3 +(2 rows) + +(SELECT t1.c1, t2.c2 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c1 = 1 ORDER BY t1.c1) +UNION (SELECT 2, 3) ORDER BY 1; + c1 | c2 +----+---- + 1 | 1 + 2 | 3 +(2 rows) + +(SELECT c1, c2 FROM ft1 WHERE c1 = 1 ORDER BY c1 LIMIT 1) UNION (SELECT 2, 3) ORDER BY 1; + c1 | c2 +----+---- + 1 | 1 + 2 | 3 +(2 rows) + +(SELECT 1 AS x, c2 FROM ft1 WHERE c1 <= 3 ORDER BY 1) EXCEPT (SELECT 1, 2) ORDER BY 2; + x | c2 +---+---- + 1 | 1 + 1 | 3 +(2 rows) + +(SELECT c1, c2 FROM ft1 WHERE c1 = 1 ORDER BY c1) INTERSECT (SELECT 1, 1); + c1 | c2 +----+---- + 1 | 1 +(1 row) + -- =================================================================== -- JOIN queries -- =================================================================== diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 6757ee9..135535b 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -8277,7 +8277,22 @@ add_foreign_ordered_paths(PlannerInfo *root, RelOptInfo *input_rel, if (input_rel->reloptkind == RELOPT_BASEREL || input_rel->reloptkind == RELOPT_JOINREL) { - Assert(root->query_pathkeys == root->sort_pathkeys); + /* + * The exception is a subquery planned as an input of a set operation + * whose ORDER BY keys are all redundant (for instance, constants, or + * columns that the WHERE clause equates to constants). Then + * sort_pathkeys is NIL and query_pathkeys is the setop_pathkeys. + * There is no final sort to do, so nothing here is unsafe to push + * down. qp_is_pushdown_safe doesn't apply, since it was computed for + * the setop_pathkeys. + */ + if (root->query_pathkeys != root->sort_pathkeys) + { + Assert(root->sort_pathkeys == NIL && + root->query_pathkeys == root->setop_pathkeys); + fpinfo->pushdown_safe = true; + return; + } /* Safe to push down if the query_pathkeys is safe to push down */ fpinfo->pushdown_safe = ifpinfo->qp_is_pushdown_safe; diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 77c9a25..16e07af 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -542,6 +542,15 @@ SELECT * FROM ( SELECT 2 AS type,c1 FROM ft2 ) a ORDER BY type; +-- A set operation's input whose ORDER BY keys are all redundant has no sort +-- to push down, though query_pathkeys holds the set operation's pathkeys. +(SELECT c1, c2 FROM ft1 WHERE c1 = 1 ORDER BY c1) UNION (SELECT 2, 3) ORDER BY 1; +(SELECT t1.c1, t2.c2 FROM ft1 t1 JOIN ft2 t2 ON (t1.c1 = t2.c1) WHERE t1.c1 = 1 ORDER BY t1.c1) +UNION (SELECT 2, 3) ORDER BY 1; +(SELECT c1, c2 FROM ft1 WHERE c1 = 1 ORDER BY c1 LIMIT 1) UNION (SELECT 2, 3) ORDER BY 1; +(SELECT 1 AS x, c2 FROM ft1 WHERE c1 <= 3 ORDER BY 1) EXCEPT (SELECT 1, 2) ORDER BY 2; +(SELECT c1, c2 FROM ft1 WHERE c1 = 1 ORDER BY c1) INTERSECT (SELECT 1, 1); + -- =================================================================== -- JOIN queries -- ===================================================================
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
@ 2026-11-03 01:14   ` David Rowley <dgrowleyml@gmail.com>
  2026-11-03 03:39     ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 11:22     ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 12:45     ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  0 siblings, 3 replies; 9+ messages in thread

From: David Rowley @ 2026-11-03 01:14 UTC (permalink / raw)
  To: Robins Tharakan <tharakan@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, Etsuro Fujita <etsuro.fujita@gmail.com>

On Tue, 3 Nov 2026 at 05:09, Robins Tharakan <tharakan@gmail.com> wrote:
> > It fails on master and REL_17_STABLE to REL_19_STABLE; 16 has no
> > setop_pathkeys. On 17 only UNION inputs trip it; from 18 EXCEPT does
> > too (and INTERSECT, tried on master). A patch follows in a reply.
> >
> > The patch (in a reply to this report), is against master 6cda9dfc4f97,
> > and applies through to REL_17_STABLE. In add_foreign_ordered_paths(),
> > the base/join branch now handles the set-operation case first:
>
>
> Here's the patch that fixes the issue.
> It applies from HEAD through REL_17_STABLE. make check passes too.

(I don't seem to have any emails to see what you're replying to here,
and [1] doesn't seem to have any matches apart from your email.)

I think we should fix this in the backbranches by modifying the Assert
to allow sort_pathkeys to be NIL. The human-done v2-0001 patch does
this, plus fixes the incorrect comment just above that was claiming
query_pathkeys must be the same as sort_pathkeys in this scenario.
That should have been updated when I added setop_pathkeys in v17.
Fixing it this way won't result in any plan changes for existing
queries, which is imporant for backpatching.

For master, I propose v2-0002 (also human-done). This effectively does
the same as your v1. What you had was quite clanky which seems to have
resulted in weird logic. I think it's fairly simple; if sort_pathkeys
is NIL, just set fpinfo->pushdown_safe to true, otherwise we can
expect sort_pathkeys to be equal to query_pathkeys.

David

[1] https://www.postgresql.org/search/?m=1&q=19827&l=8&d=-1&s=d

Attachments: download all (2 files, .tar.gz)

v2-0001-Fix-incorrect-Assert-in-add_foreign_ordered_paths.patch (application/octet-stream, 5.3K) download From 68dad257291c8327bccbd7175c6ea62932bc1972 Mon Sep 17 00:00:00 2001 From: David Rowley <dgrowley@gmail.com> Date: Tue, 3 Nov 2026 12:59:14 +1300 Subject: [PATCH v2 1/2] Fix incorrect Assert in add_foreign_ordered_paths 12933dc60 (originally 66c0185a3) added setop_pathkeys, which can be set and applied to query_pathkeys for set operation child queries when the child query does not have other final pathkey requirements. add_foreign_ordered_paths() assumed that if the query had an ORDER BY that the query_pathkeys would be equal to sort_pathkeys. That's not true when query_pathkeys is set to setop_pathkeys. standard_qp_callback can do this when all PathKeys for the ORDER BY clause were marked as redundant. Here we relax the Assert to allow for sort_pathkeys to be empty. In this case it is technically ok to mark pushdown_safe as true so that postgresGetForeignUpperPaths() allows add_foreign_final_paths() to generate paths with the LIMIT clause pushed down. We don't adjust that here as that could cause plan changes in the backbranches. Let's just fix things enough so the Assert doesn't fail and do a proper fix in master. Backpatch to 17 where the setop_pathkeys field was added. Reported-by: Robins Tharakan <tharakan@gmail.com> Discussion: https://postgr.es/m/CAEP4nAwnSefmi4w+89XbHQ0f-0OixCYUJo9kVcbXSYL8L4rEPg@mail.gmail.com Backpatch-through: 17 --- .../postgres_fdw/expected/postgres_fdw.out | 26 +++++++++++++++++++ contrib/postgres_fdw/postgres_fdw.c | 16 ++++++------ contrib/postgres_fdw/sql/postgres_fdw.sql | 9 +++++++ 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index 115ebc7925f..fa5844aa9cd 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -1382,6 +1382,32 @@ SELECT * FROM ( Remote SQL: SELECT "C 1" FROM "S 1"."T 1" (8 rows) +-- Ensure the code works correctly when sort_pathkeys is empty due to +-- a redundant pathkey. +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ( + (SELECT c1, c2 FROM ft1 WHERE c1 = 0 ORDER BY c1 LIMIT 1) + UNION + (SELECT c1, c2 FROM ft1 WHERE c1 = 0 ORDER BY c1) +) a; + QUERY PLAN +--------------------------------------------------------------------------------------------- + Unique + Output: ft1.c1, ft1.c2 + -> Sort + Output: ft1.c1, ft1.c2 + Sort Key: ft1.c1, ft1.c2 + -> Append + -> Limit + Output: ft1.c1, ft1.c2 + -> Foreign Scan on public.ft1 + Output: ft1.c1, ft1.c2 + Remote SQL: SELECT "C 1", c2 FROM "S 1"."T 1" WHERE (("C 1" = 0)) + -> Foreign Scan on public.ft1 ft1_1 + Output: ft1_1.c1, ft1_1.c2 + Remote SQL: SELECT "C 1", c2 FROM "S 1"."T 1" WHERE (("C 1" = 0)) +(14 rows) + -- =================================================================== -- JOIN queries -- =================================================================== diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 6757ee923cb..1acf506f6fa 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -8268,20 +8268,20 @@ add_foreign_ordered_paths(PlannerInfo *root, RelOptInfo *input_rel, merge_fdw_options(fpinfo, ifpinfo, NULL); /* - * If the input_rel is a base or join relation, we would already have - * considered pushing down the final sort to the remote server when - * creating pre-sorted foreign paths for that relation, because the - * query_pathkeys is set to the root->sort_pathkeys in that case (see - * standard_qp_callback()). + * If the input_rel is a base or join relation, + * add_paths_with_pathkeys_for_rel() already considered the creation of + * paths to suit query_pathkeys. sort_pathkeys can be NIL here despite + * the query having an ORDER BY clause, and query_pathkeys can be set to + * setop_pathkeys (see standard_qp_callback()). */ if (input_rel->reloptkind == RELOPT_BASEREL || input_rel->reloptkind == RELOPT_JOINREL) { - Assert(root->query_pathkeys == root->sort_pathkeys); + Assert(root->query_pathkeys == root->sort_pathkeys || + root->sort_pathkeys == NIL); - /* Safe to push down if the query_pathkeys is safe to push down */ + /* Safe to push down if the query_pathkeys are safe to push down */ fpinfo->pushdown_safe = ifpinfo->qp_is_pushdown_safe; - return; } diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 77c9a25a890..058caac503f 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -542,6 +542,15 @@ SELECT * FROM ( SELECT 2 AS type,c1 FROM ft2 ) a ORDER BY type; +-- Ensure the code works correctly when sort_pathkeys is empty due to +-- a redundant pathkey. +EXPLAIN (VERBOSE, COSTS OFF) +SELECT * FROM ( + (SELECT c1, c2 FROM ft1 WHERE c1 = 0 ORDER BY c1 LIMIT 1) + UNION + (SELECT c1, c2 FROM ft1 WHERE c1 = 0 ORDER BY c1) +) a; + -- =================================================================== -- JOIN queries -- =================================================================== -- 2.53.0
v2-0002-Allow-postgres_fdw-to-pushdown-LIMIT-with-empty-s.patch (application/octet-stream, 3.5K) download From a4950fa5e5a684315b0ac2bbe0c7ecc602cb34b6 Mon Sep 17 00:00:00 2001 From: David Rowley <dgrowley@gmail.com> Date: Tue, 3 Nov 2026 13:34:05 +1300 Subject: [PATCH v2 2/2] Allow postgres_fdw to pushdown LIMIT with empty sort_pathkeys There is no need to consider the shippability of query_pathkeys here. If sort_pathkeys is NIL due to all PathKeys being redundant for the ORDER BY clause then query_pathkeys can be set to setop_pathkeys, and those may have non-shippable PathKeys. There's no need to consider those when processing UPPERREL_FINAL in postgresGetForeignUpperPaths(). Discussion: https://postgr.es/m/CAEP4nAwnSefmi4w+89XbHQ0f-0OixCYUJo9kVcbXSYL8L4rEPg@mail.gmail.com --- contrib/postgres_fdw/expected/postgres_fdw.out | 10 ++++++++++ contrib/postgres_fdw/postgres_fdw.c | 14 ++++++++++---- contrib/postgres_fdw/sql/postgres_fdw.sql | 4 ++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index fa5844aa9cd..b946a6416a0 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -1408,6 +1408,16 @@ SELECT * FROM ( Remote SQL: SELECT "C 1", c2 FROM "S 1"."T 1" WHERE (("C 1" = 0)) (14 rows) +-- Ensure the LIMIT clause is pushed to the foreign server +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1, c2 FROM ft7 WHERE c1 = 0 ORDER BY c1 LIMIT 1; + QUERY PLAN +------------------------------------------------------------------------------- + Foreign Scan on public.ft7 + Output: c1, c2 + Remote SQL: SELECT c1, c2 FROM "S 1"."T 4" WHERE ((c1 = 0)) LIMIT 1::bigint +(3 rows) + -- =================================================================== -- JOIN queries -- =================================================================== diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 1acf506f6fa..7621f679a99 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -8277,11 +8277,17 @@ add_foreign_ordered_paths(PlannerInfo *root, RelOptInfo *input_rel, if (input_rel->reloptkind == RELOPT_BASEREL || input_rel->reloptkind == RELOPT_JOINREL) { - Assert(root->query_pathkeys == root->sort_pathkeys || - root->sort_pathkeys == NIL); + /* mark pushdown as safe when no sort is required for the ORDER BY */ + if (root->sort_pathkeys == NIL) + fpinfo->pushdown_safe = true; + else + { + Assert(root->query_pathkeys == root->sort_pathkeys); + + /* Safe to push down if the query_pathkeys are safe to push down */ + fpinfo->pushdown_safe = ifpinfo->qp_is_pushdown_safe; + } - /* Safe to push down if the query_pathkeys are safe to push down */ - fpinfo->pushdown_safe = ifpinfo->qp_is_pushdown_safe; return; } diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 058caac503f..906d76a4ff3 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -551,6 +551,10 @@ SELECT * FROM ( (SELECT c1, c2 FROM ft1 WHERE c1 = 0 ORDER BY c1) ) a; +-- Ensure the LIMIT clause is pushed to the foreign server +EXPLAIN (VERBOSE, COSTS OFF) +SELECT c1, c2 FROM ft7 WHERE c1 = 0 ORDER BY c1 LIMIT 1; + -- =================================================================== -- JOIN queries -- =================================================================== -- 2.53.0
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
@ 2026-11-03 03:39     ` Robins Tharakan <tharakan@gmail.com>
  2026-11-04 10:15       ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Álvaro Herrera <alvherre@kurilemu.de>
  2 siblings, 1 reply; 9+ messages in thread

From: Robins Tharakan @ 2026-11-03 03:39 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, Etsuro Fujita <etsuro.fujita@gmail.com>

Hi David,

Thanks for taking a look.

On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml@gmail.com> wrote:
> On Tue, 3 Nov 2026 at 05:09, Robins Tharakan <tharakan@gmail.com> wrote:
> >
> > Here's the patch that fixes the issue.
> > It applies from HEAD through REL_17_STABLE. make check passes too.
>
> (I don't seem to have any emails to see what you're replying to here,
> and [1] doesn't seem to have any matches apart from your email.)

It is odd that despite receiving an email via the web-form submission process,
it is missing from the pgsql-bugs web-portal today. At this point, it seems like
a bug with the web-form / mailing system.

Anyway, below is the verbatim copy of what I received from the
pgsql-bugs web-form submission that has my original triaging and
testing details.


"
PG Bug reporting form <noreply@postgresql.org>
02:14 (11 hours ago)
to pgsql-bugs, me

The following bug has been logged on the website:

Bug reference:      19827
Logged by:          Robins Tharakan
Email address:      tharakan@gmail.com
PostgreSQL version: 19rc1
Operating system:   Debian 13 (x86_64)
Description:

A set-operation input that scans a postgres_fdw foreign table and has
an ORDER BY whose keys are all redundant (a constant, or a column the
WHERE clause equates to a constant) fails this assertion:

  TRAP: failed Assert("root->query_pathkeys == root->sort_pathkeys"),
  File: "postgres_fdw.c", Line: 8280

Release builds return correct rows (checked against the local table).

add_foreign_ordered_paths() asserts that query_pathkeys is
sort_pathkeys for a base or join rel. Since 66c0185a3,
standard_qp_callback() falls back to setop_pathkeys when sort_pathkeys
is NIL, for an input of a set operation. A redundant ORDER BY leaves
sort_pathkeys NIL while the query still has a sortClause, so
create_ordered_paths() still calls the FDW for UPPERREL_ORDERED.

It fails on master and REL_17_STABLE to REL_19_STABLE; 16 has no
setop_pathkeys. On 17 only UNION inputs trip it; from 18 EXCEPT does
too (and INTERSECT, tried on master). A patch follows in a reply.

SQL
===
CREATE EXTENSION postgres_fdw;
DO $$
BEGIN
  EXECUTE format('CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw
                    OPTIONS (dbname %L, port %L)',
                 current_database(), current_setting('port'));
END
$$;
CREATE USER MAPPING FOR CURRENT_USER SERVER loopback;
CREATE TABLE t (a int, b bool);
INSERT INTO t VALUES (1, true), (2, false);
CREATE FOREIGN TABLE ft (a int, b bool)
  SERVER loopback OPTIONS (table_name 't');

(SELECT a, b FROM ft WHERE a = 1 ORDER BY a) UNION (SELECT 2, true);

-- from 18, also:
(SELECT 1 AS x, b FROM ft ORDER BY 1) EXCEPT (SELECT 1, true);

Commit
======
6cda9dfc4f97 (master) — fails here
Reproduced starting from 12933dc6048, a re-commit of 66c0185a3.
Built with --enable-cassert and -O2 (gcc 14.2, Debian 13, x86_64).

Backtrace
=========
#4  add_foreign_ordered_paths (...) at postgres_fdw.c:8280
#5  postgresGetForeignUpperPaths (root=..., stage=UPPERREL_ORDERED, ...)
    at postgres_fdw.c:8119
#6  create_ordered_paths (...) at planner.c:5784
#7  grouping_planner (...) at planner.c:2160
#8  subquery_planner (..., plan_name="setop_1", ...) at planner.c:1367
#9  recurse_set_operations (...) at prepunion.c:252
#10 generate_nonunion_paths (...) at prepunion.c:1091
#11 recurse_set_operations (...) at prepunion.c:287
#12 plan_set_operations (root=...) at prepunion.c:164
(EXCEPT case; UNION goes through generate_union_paths)

Patch
=====
The patch (in a reply to this report), is against master 6cda9dfc4f97,
and applies through to REL_17_STABLE. In add_foreign_ordered_paths(),
the base/join branch now handles the set-operation case first:

+               if (root->query_pathkeys != root->sort_pathkeys)
+               {
+                       Assert(root->sort_pathkeys == NIL &&
+                                  root->query_pathkeys ==
root->setop_pathkeys);
+                       fpinfo->pushdown_safe = true;
+                       return;
+               }

Why that patch looks correct:
- For a base or join rel, query_pathkeys can differ from sort_pathkeys
  only through the setop_pathkeys fallback: GROUP BY, window functions
  or DISTINCT would make the ordered stage's input an upper rel. The
  new Assert checks that.
- With sort_pathkeys NIL there's no final sort, so the ordered rel is
  safe to push down, as the grouping-rel path below already decides
  when sort_pathkeys is NIL.
- Release builds took pushdown_safe from qp_is_pushdown_safe, computed
  for setop_pathkeys, so a LIMIT in the input was pushed down only if
  the set operation's order could be. Results were right either way.
  The one plan change: such an input with a LIMIT whose set-operation
  order can't be shipped now pushes the LIMIT down without ORDER BY,
  which is fine since every row ties on the redundant keys.
- A top-level query with an all-redundant ORDER BY is unchanged:
  query_pathkeys is NIL there too.

The test adds five queries to postgres_fdw.sql: UNION inputs over a
base rel, over a join and with a LIMIT, an EXCEPT input and an
INTERSECT input. They check rows, not plans, so one expected output
fits every branch.

To keep back-branch plans exactly as they are, set pushdown_safe from
qp_is_pushdown_safe in the new block instead; it's a one-line change.

Testing
=======
On the tips of master (6cda9dfc4f97), REL_19_STABLE (4942dc745cf1),
REL_18_STABLE (19a2002b5db9) and REL_17_STABLE (9c44922d125c), with
assertions: the patch applies and compiles with no warning in
postgres_fdw.c, the core regression tests and postgres_fdw's pass, and
with the postgres_fdw.c change reverted, the new test hits this
assertion.

By hand, plans match an unpatched release build's except in that one
case. For

  (SELECT a, b::text COLLATE "C" AS c FROM ft
   WHERE a = 1 ORDER BY a LIMIT 1) UNION (SELECT 2, 'x');

the patched build sends

  SELECT a, b FROM public.t WHERE ((a = 1)) LIMIT 1::bigint

where the unpatched build applies the LIMIT locally. The rows are the
same.

Found using SQLsmith and Claude.

-
Robins Tharakan

"

-
Robins
Databricks





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
  2026-11-03 03:39     ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
@ 2026-11-04 10:15       ` Álvaro Herrera <alvherre@kurilemu.de>
  2026-11-04 11:30         ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Álvaro Herrera @ 2026-11-04 10:15 UTC (permalink / raw)
  To: Robins Tharakan <tharakan@gmail.com>; +Cc: David Rowley <dgrowleyml@gmail.com>; pgsql-bugs@lists.postgresql.org, Etsuro Fujita <etsuro.fujita@gmail.com>

On 2026-Nov-03, Robins Tharakan wrote:

> On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml@gmail.com> wrote:

> > (I don't seem to have any emails to see what you're replying to here,
> > and [1] doesn't seem to have any matches apart from your email.)
> 
> It is odd that despite receiving an email via the web-form submission process,
> it is missing from the pgsql-bugs web-portal today. At this point, it seems like
> a bug with the web-form / mailing system.

I'm sure there are bugs, but this is not one of them.

It's just that all pgsql-bugs submissions via the web interface go
through human moderation; but you (as submitter) also got the copy that
we CC to you directly.  The pgsql-bugs one was not approved until a few
hours later, but David had already received the direct CC reply that you
sent quoting the direct CC you had received, before any pgsql-bugs
moderators had a chance to approve the original email.

These emails have now been approved and the entirety of the thread can
be seen in the pgsql-bugs archives.

https://www.postgresql.org/message-id/flat/19827-6e0bc0f9a5226e71%40postgresql.org

Please don't cry wolf so eagerly, but thanks for reporting Postgres
bugs.

Regards

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Postgres is bloatware by design: it was built to house
 PhD theses." (Joey Hellerstein, SIGMOD annual conference 2002)






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
  2026-11-03 03:39     ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-04 10:15       ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Álvaro Herrera <alvherre@kurilemu.de>
@ 2026-11-04 11:30         ` Robins Tharakan <tharakan@gmail.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Robins Tharakan @ 2026-11-04 11:30 UTC (permalink / raw)
  To: Álvaro Herrera <alvherre@kurilemu.de>; +Cc: David Rowley <dgrowleyml@gmail.com>; pgsql-bugs@lists.postgresql.org, Etsuro Fujita <etsuro.fujita@gmail.com>

Hi Alvaro,

On Wed, 4 Nov 2026 at 20:45, Álvaro Herrera <alvherre@kurilemu.de> wrote:

> On 2026-Nov-03, Robins Tharakan wrote:
>
> > On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml@gmail.com> wrote:
>
> > > (I don't seem to have any emails to see what you're replying to here,
> > > and [1] doesn't seem to have any matches apart from your email.)
> >
> > It is odd that despite receiving an email via the web-form submission
> process,
> > it is missing from the pgsql-bugs web-portal today. At this point, it
> seems like
> > a bug with the web-form / mailing system.
>
> I'm sure there are bugs, but this is not one of them.
>
> It's just that all pgsql-bugs submissions via the web interface go
> through human moderation; but you (as submitter) also got the copy that
> we CC to you directly.  The pgsql-bugs one was not approved until a few
> hours later, but David had already received the direct CC reply that you
> sent quoting the direct CC you had received, before any pgsql-bugs
> moderators had a chance to approve the original email.
>
> These emails have now been approved and the entirety of the thread can
> be seen in the pgsql-bugs archives.
>
>
> https://www.postgresql.org/message-id/flat/19827-6e0bc0f9a5226e71%40postgresql.org
>
>
Thanks, this explanation makes perfect sense. My apologies for
the confusion. I'll await the mailing-list web portal to show up the
original bug-submission (so that I can be sure everyone's got a
copy) before posting follow-ups.

-
Robins

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
@ 2026-11-03 11:22     ` Robins Tharakan <tharakan@gmail.com>
  2026-11-04 03:25       ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
  2 siblings, 1 reply; 9+ messages in thread

From: Robins Tharakan @ 2026-11-03 11:22 UTC (permalink / raw)
  To: David Rowley <dgrowleyml@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, Etsuro Fujita <etsuro.fujita@gmail.com>

Hi David,

On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml@gmail.com> wrote:
> I think we should fix this in the backbranches by modifying the Assert
> to allow sort_pathkeys to be NIL.

> Fixing it this way won't result in any plan changes for existing
> queries, which is imporant for backpatching.

+1. Agree with the need to ensure back branches' plans don't change here.
On a quick check, both v2 patches tested fine for me:

- v2-0001 was tested on REL_17_STABLE .. REL_19_STABLE. It applies,
  compiles with no warnings, and make check / postgres_fdw's
  tests pass.
- Similarly v2-0001 + v2-0002 on master passes both tests too.

-
Robins

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
  2026-11-03 11:22     ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
@ 2026-11-04 03:25       ` David Rowley <dgrowleyml@gmail.com>
  0 siblings, 0 replies; 9+ messages in thread

From: David Rowley @ 2026-11-04 03:25 UTC (permalink / raw)
  To: Robins Tharakan <tharakan@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, Etsuro Fujita <etsuro.fujita@gmail.com>

On Wed, 4 Nov 2026 at 00:23, Robins Tharakan <tharakan@gmail.com> wrote:
> On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml@gmail.com> wrote:
> > I think we should fix this in the backbranches by modifying the Assert
> > to allow sort_pathkeys to be NIL.
>
> > Fixing it this way won't result in any plan changes for existing
> > queries, which is imporant for backpatching.
>
> +1. Agree with the need to ensure back branches' plans don't change here.
> On a quick check, both v2 patches tested fine for me:
>
> - v2-0001 was tested on REL_17_STABLE .. REL_19_STABLE. It applies,
>   compiles with no warnings, and make check / postgres_fdw's
>   tests pass.
> - Similarly v2-0001 + v2-0002 on master passes both tests too.

Thanks for having a look. I've now backpatched 0001 and applied 0002 to master.

David






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
  2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
  2026-11-02 16:08 ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input Robins Tharakan <tharakan@gmail.com>
  2026-11-03 01:14   ` Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input David Rowley <dgrowleyml@gmail.com>
@ 2026-11-03 12:45     ` Robins Tharakan <tharakan@gmail.com>
  2 siblings, 0 replies; 9+ messages in thread

From: Robins Tharakan @ 2026-11-03 12:45 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

Hi,

On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Tue, 3 Nov 2026 at 05:09, Robins Tharakan <tharakan@gmail.com> wrote:
> >
> > Here's the patch that fixes the issue.
> > It applies from HEAD through REL_17_STABLE. make check passes too.
>
> (I don't seem to have any emails to see what you're replying to here,
> and [1] doesn't seem to have any matches apart from your email.)

This conversation has moved to a separate thread, I’m sending this just for
the record.

I've sent a copy of my original email to David / Etsuro directly, but I'm
making
a short-note here that the mailing-list filters are blocking the original
contents of this email for some reason (or slowing delivery). I've tried
sending
the original email twice and both times, they haven't (yet) shown up on the
mailing-list portal [1] although mails before / after already do.

Attached is a screenshot of the email from the web-form submission email
with the Bug ID 19827.

-
Robins

Ref:
1.
https://www.postgresql.org/message-id/flat/CAEP4nAz0OD9M_ktFbHmUh4cObNA__tCcUe%3D1hZZGGsCDqoS2Aw%40m...

Attachments:

Screenshot 2026-11-03 225559.png (image/png, 179.0K) download view image
^ permalink raw reply [nested|flat] 9+ messages in thread


end of thread, other threads:[~2026-11-04 11:30 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 15:43 BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input PG Bug reporting form <noreply@postgresql.org>
2026-11-02 16:08 ` Robins Tharakan <tharakan@gmail.com>
2026-11-03 01:14   ` David Rowley <dgrowleyml@gmail.com>
2026-11-03 03:39     ` Robins Tharakan <tharakan@gmail.com>
2026-11-04 10:15       ` Álvaro Herrera <alvherre@kurilemu.de>
2026-11-04 11:30         ` Robins Tharakan <tharakan@gmail.com>
2026-11-03 11:22     ` Robins Tharakan <tharakan@gmail.com>
2026-11-04 03:25       ` David Rowley <dgrowleyml@gmail.com>
2026-11-03 12:45     ` Robins Tharakan <tharakan@gmail.com>

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