Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input

From: Robins Tharakan <tharakan(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
Subject: Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
Date: 2026-11-02 16:08:35
Message-ID: CAEP4nAwnSefmi4w+89XbHQ0f-0OixCYUJo9kVcbXSYL8L4rEPg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Attachment Content-Type Size
repro.sql application/octet-stream 865 bytes
v1-0001-postgres_fdw-Fix-assertion-with-redundant-ORDER-BY-in-set-op-input.patch application/octet-stream 5.5 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Venu K 2026-11-02 16:08:46 Re: BUG #19828: "plan should not reference subplan's variable" with Memoize since f8da64e6
Previous Message Fujii Masao 2026-11-02 16:05:35 Re: Lost walsender wakeup stalls synchronous commits until the standby's next reply (16+)