Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-06 Thread Fujii Masao
On 2021/04/06 22:02, Michael Paquier wrote: On Tue, Apr 06, 2021 at 02:39:54PM +0200, Matthias van de Meent wrote: On Tue, 6 Apr 2021 at 14:29, Fujii Masao wrote: Attached is the updated version of the patch. Barring any objection, I'm thinking to commit this. Sorry for the late reply.

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-06 Thread Michael Paquier
On Tue, Apr 06, 2021 at 02:39:54PM +0200, Matthias van de Meent wrote: > On Tue, 6 Apr 2021 at 14:29, Fujii Masao wrote: >> Attached is the updated version of the patch. Barring any objection, >> I'm thinking to commit this. Sorry for the late reply. The approach to use LIMIT TO for this

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-06 Thread Matthias van de Meent
On Tue, 6 Apr 2021 at 14:29, Fujii Masao wrote: > > Thanks! So I applied all the changes that I suggested upthread to the patch. > I also updated the comment as follows. > > * Import table data for partitions only when they are > explicitly > -* specified in

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-06 Thread Fujii Masao
On 2021/04/06 16:05, Amit Langote wrote: On Tue, Apr 6, 2021 at 8:34 AM Fujii Masao wrote: For now I have no objection to this feature. -IMPORT FOREIGN SCHEMA import_source EXCEPT (t1, "x 4", nonesuch) +IMPORT FOREIGN SCHEMA import_source EXCEPT (t1, "x 4", nonesuch, t4_part) Isn't it

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-06 Thread Amit Langote
On Tue, Apr 6, 2021 at 8:34 AM Fujii Masao wrote: > For now I have no objection to this feature. > > -IMPORT FOREIGN SCHEMA import_source EXCEPT (t1, "x 4", nonesuch) > +IMPORT FOREIGN SCHEMA import_source EXCEPT (t1, "x 4", nonesuch, t4_part) > > Isn't it better to create also another partition

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-06 Thread Amit Langote
Hi Matthias, On Wed, Mar 24, 2021 at 9:23 PM Matthias van de Meent wrote: > On Mon, 22 Mar 2021 at 21:16, Bernd Helmle wrote: > > The patch changes IMPORT FOREIGN SCHEMA to explicitely allow partition > > child tables in the LIMIT TO clause of the IMPORT FOREIGN SCHEMA > > command by relaxing

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-04-05 Thread Fujii Masao
On 2021/03/29 2:39, Bernd Helmle wrote: Am Mittwoch, dem 24.03.2021 um 17:32 +0100 schrieb Bernd Helmle: Yes, but it should be noted that the main reason that was mentioned as a reason to exclude partitions is to not cause table catalog bloat, and I argue that this argument is not as solid

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-03-28 Thread Bernd Helmle
Am Mittwoch, dem 24.03.2021 um 17:32 +0100 schrieb Bernd Helmle: > > Yes, but it should be noted that the main reason that was mentioned > > as > > a reason to exclude partitions is to not cause table catalog bloat, > > and I argue that this argument is not as solid in the case of the > >

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-03-24 Thread Bernd Helmle
Am Mittwoch, dem 24.03.2021 um 13:23 +0100 schrieb Matthias van de Meent: > Yes, but it should be noted that the main reason that was mentioned > as > a reason to exclude partitions is to not cause table catalog bloat, > and I argue that this argument is not as solid in the case of the >

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-03-24 Thread Matthias van de Meent
On Mon, 22 Mar 2021 at 21:16, Bernd Helmle wrote: > > Hi, > > I took a look at this patch. Thanks! > Patch applies on current master. > > Documentation and adjusted regression tests included. > Regression tests passes without errors. > > The patch changes IMPORT FOREIGN SCHEMA to explicitely

Re: postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-03-22 Thread Bernd Helmle
Am Donnerstag, dem 21.01.2021 um 15:56 +0100 schrieb Matthias van de Meent: > Hi, > > Recently I was trying to copy some of the data of one database to > another through postgres_fdw, and found that it wouldn't import that > partition through IMPORT FOREIGN SCHEMA, even when I explicitly >

postgres_fdw: IMPORT FOREIGN SCHEMA ... LIMIT TO (partition)

2021-01-21 Thread Matthias van de Meent
Hi, Recently I was trying to copy some of the data of one database to another through postgres_fdw, and found that it wouldn't import that partition through IMPORT FOREIGN SCHEMA, even when I explicitly specified the name of the table that contained the data in the LIMIT TO clause. I realised