pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Michael Paquier <michael.paquier@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: postgres_fdw IMPORT SCHEMA and partitioned tables
Date: Fri, 31 Mar 2017 13:37:55 +0900
Message-ID: <2cab6db2-cf10-b8f2-58ed-7d4a052dac34@lab.ntt.co.jp> (raw)
In-Reply-To: <CAB7nPqSh=8dd=gDrcS_ASecG_et8t2VmgSuPyHf57e2=mpWi+A@mail.gmail.com>
References: <20170309141531.GD9812@tamriel.snowman.net>
	<CAB7nPqSjyMBDDk+RHRoPVZ7yWZTvq73_Bg0HTG9hR0T=O1f5mg@mail.gmail.com>
	<eeebe90d-523f-9b0b-be46-8b5f34ea5412@lab.ntt.co.jp>
	<CA+TgmobwR1WjV19Wv1GtZoBSXVHX9HpwSfSdjZtnPNhH0SgxMQ@mail.gmail.com>
	<CAB7nPqTDpzym=vJz-LooFHfdO-5fudb=b5XacEXHWVCZeULMjw@mail.gmail.com>
	<CAB7nPqSh=8dd=gDrcS_ASecG_et8t2VmgSuPyHf57e2=mpWi+A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2017/03/31 13:23, Michael Paquier wrote:
> On Wed, Mar 29, 2017 at 12:30 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> Users like things that are friendly, and we are most likely going to
>> piss them off when using postgres_fdw if they need to list manually
>> each parent table from the IMPORT FOREIGN SCHEMA command.
>>
>>> However, if we're going to do something about this, I think it should
>>> be done soon.  Otherwise, I'm going to advocate for reclassifying this
>>> issue from "open item" to "possible area for future development".
>>
>> I was just waiting for the end of the CF before sending in a patch,
>> allocating now some time to look at some patches pending for reviews.
> 
> And here is the promised patch to address this open item.

Looks good to me, except maybe:

+
+   <para>
+    For partitioned tables, partitions are automatically excluded from the
+    schema data imported. Only the definition of partitioned tables is
included
+    to give access to the full data set of all partitions present remotely.
+   </para>
+

Only the definitions of "root" partitioned tables, because when using
multi-level partitioning, there would be partitioned tables that won't be
included (because, relispartition=true).

If you agree, then this code comment too could use the same terminology:

+         * Ignore table data for partitions and only include the parent
+         * definitions to allow access to the complete remote data set
+         * locally in the schema imported.
+         *

Thanks,
Amit




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (14+ messages)  latest in thread

Message-ID: <2cab6db2-cf10-b8f2-58ed-7d4a052dac34@lab.ntt.co.jp>
Permalink:  ../2cab6db2-cf10-b8f2-58ed-7d4a052dac34@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/2cab6db2-cf10-b8f2-58ed-7d4a052dac34@lab.ntt.co.jp

 · 

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-hackers@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, michael.paquier@gmail.com, robertmhaas@gmail.com, sfrost@snowman.net
  Subject: Re: postgres_fdw IMPORT SCHEMA and partitioned tables
  In-Reply-To: <2cab6db2-cf10-b8f2-58ed-7d4a052dac34@lab.ntt.co.jp>

* 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