public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Robert Haas <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: postgres_fdw: using TABLESAMPLE to collect remote sample
Date: Fri, 11 Feb 2022 13:06:01 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoYx596-mqUP=xf0DdQ97UERxXfzhR0Otpa411sGV1vKow@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CA+TgmoYx596-mqUP=xf0DdQ97UERxXfzhR0Otpa411sGV1vKow@mail.gmail.com>
Robert Haas <[email protected]> writes:
> I think it's going to be necessary to compromise on that at some
> point.
Sure. The existing postgres_fdw documentation [1] already addresses
this issue:
postgres_fdw can be used with remote servers dating back to PostgreSQL
8.3. Read-only capability is available back to 8.1. A limitation
however is that postgres_fdw generally assumes that immutable built-in
functions and operators are safe to send to the remote server for
execution, if they appear in a WHERE clause for a foreign table. Thus,
a built-in function that was added since the remote server's release
might be sent to it for execution, resulting in “function does not
exist” or a similar error. This type of failure can be worked around
by rewriting the query, for example by embedding the foreign table
reference in a sub-SELECT with OFFSET 0 as an optimization fence, and
placing the problematic function or operator outside the sub-SELECT.
While I'm not opposed to moving those goalposts at some point,
I think pushing them all the way up to 9.5 for this one easily-fixed
problem is not very reasonable.
Given other recent discussion, an argument could be made for moving
the cutoff to 9.2, on the grounds that it's too hard to test against
anything older. But that still leaves us needing a version check
if we want to use TABLESAMPLE.
regards, tom lane
[1] https://www.postgresql.org/docs/devel/postgres-fdw.html#id-1.11.7.45.17
view thread (17+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: postgres_fdw: using TABLESAMPLE to collect remote sample
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox