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: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, 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-03 11:22:42
Message-ID: CAEP4nAz0OD9M_ktFbHmUh4cObNA__tCcUe=1hZZGGsCDqoS2Aw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi David,

On Tue, 3 Nov 2026 at 11:44, David Rowley <dgrowleyml(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robins Tharakan 2026-11-03 12:45:27 Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
Previous Message Ayush Tiwari 2026-11-03 10:35:55 Re: BUG #19720: pg_trgm GiST index corruption from gtrgm_union() dropping SIGNKEY