pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: be more wary about shippability of reg* constants.
Date: Sun, 17 Jul 2022 22:11:51 +0000
Message-ID: <E1oDCUQ-0000al-KD@gemulon.postgresql.org> (raw)

postgres_fdw: be more wary about shippability of reg* constants.

Don't consider a constant of regconfig or other reg* types to be
shippable unless it refers to a built-in object, or an object in
an extension that's been marked shippable.  Without this
restriction, we're too likely to send a constant that will fail
to parse on the remote server.

For the regconfig type only, consider OIDs up to 16383 to be
"built in", rather than the normal cutoff of 9999.  Otherwise
the initdb-created text search configurations will be considered
unshippable, which is unlikely to make anyone happy.

It's possible that this new restriction will de-optimize queries
that were working satisfactorily before.  Users can restore any
lost performance by making sure that objects that can be expected
to exist on the remote side are in shippable extensions.  However,
that's not a change that people are likely to be happy about having
to make after a minor-release update.  Between that consideration
and the lack of field complaints, let's just change this in HEAD.

Noted while fixing bug #17483, although this is not precisely
the problem that that report complained about.

Discussion: https://postgr.es/m/1423433.1652722406@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/31e5b502920351ddcf8f5efa7f2dc4a60ecdca3a

Modified Files
--------------
contrib/postgres_fdw/deparse.c                 | 72 ++++++++++++++++++++++++++
contrib/postgres_fdw/expected/postgres_fdw.out | 25 ++++++++-
contrib/postgres_fdw/sql/postgres_fdw.sql      | 12 ++++-
3 files changed, 107 insertions(+), 2 deletions(-)



Message-ID: <E1oDCUQ-0000al-KD@gemulon.postgresql.org>
Permalink:  ../E1oDCUQ-0000al-KD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oDCUQ-0000al-KD@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: postgres_fdw: be more wary about shippability of reg* constants.
  In-Reply-To: <E1oDCUQ-0000al-KD@gemulon.postgresql.org>
  References: <E1oDCUQ-0000al-KD@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