pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Etsuro Fujita <efujita@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser
Date: Fri, 07 Jun 2024 08:55:33 +0000
Message-ID: <E1sFVNk-000Nvf-9v@gemulon.postgresql.org> (raw)

postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote servers.

Previously, when considering LIMIT pushdown, postgres_fdw failed to
check whether the query has this clause, which led to pushing false
LIMIT clauses, causing incorrect results.

This clause has been supported since v13, so we need to do a
remote-version check before deciding that it will be safe to push such a
clause, but we do not currently have a way to do the check (without
accessing the remote server); disable pushing such a clause for now.

Oversight in commit 357889eb1.  Back-patch to v13, where that commit
added the support.

Per bug #18467 from Onder Kalaci.

Patch by Japin Li, per a suggestion from Tom Lane, with some changes to
the comments by me.  Review by Onder Kalaci, Alvaro Herrera, and me.

Discussion: https://postgr.es/m/18467-7bb89084ff03a08d%40postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2b461efc5195e9b359dcf0ac98487bdfcbd1347f

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 21 +++++++++++++++++++++
contrib/postgres_fdw/postgres_fdw.c            | 14 ++++++++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql      |  5 +++++
3 files changed, 40 insertions(+)



view thread (5+ messages)  latest in thread

Message-ID: <E1sFVNk-000Nvf-9v@gemulon.postgresql.org>
Permalink:  ../E1sFVNk-000Nvf-9v@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sFVNk-000Nvf-9v@gemulon.postgresql.org

 · 

reply

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: efujita@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: postgres_fdw: Refuse to send FETCH FIRST WITH TIES to remote ser
  In-Reply-To: <E1sFVNk-000Nvf-9v@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