Re: postgres_fdw IMPORT SCHEMA and partitioned tables

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Stephen Frost <sfrost@snowman.net>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-03-31T23:19:04Z
Lists: pgsql-hackers
On Sat, Apr 1, 2017 at 4:55 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Fri, Mar 31, 2017 at 3:31 PM, Andres Freund <andres@anarazel.de> wrote:
>>> Hm. Wonder if something like that shouldn't be backpatched - because
>>> otherwise using postgres_fdw from an old server against a newer one will
>>> do weird stuff.  I don't know what kind of policy we've committed to
>>> with postgresImportForeignSchema...
>
>> I don't think I'd like to promise that postgres_fdw will always be
>> forward-compatible.  Backward-compatibility is hard enough already.

Thanks for the commit.

> Unless I'm missing something, the behavior will be that an older
> version will simply ignore remote partitioned tables (they will not
> pass the relkind filter in the query).  Seems pretty fail-soft,
> so I think it's fine.

Yeah, I would suggest to revisit that if we get actual complaints, but
I would not push much in favor of it. It's not an area where nothing
can be done to improve the user experience.
-- 
Michael


Commits

  1. postgres_fdw: Teach IMPORT FOREIGN SCHEMA about partitioning.