[BUGS] BUG #14759: insert into foreign data partitions fail - Mailing list pgsql-bugs

From mtuncer@gmail.com
Subject [BUGS] BUG #14759: insert into foreign data partitions fail
Date
Msg-id 20170724212815.1456.54156@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14759: insert into foreign data partitions fail  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14759
Logged by:          Murat Tuncer
Email address:      mtuncer@gmail.com
PostgreSQL version: 10beta2
Operating system:   Mac 10.12.6
Description:

I got 

ERROR:  cannot route inserted tuples to a foreign table

when trying to insert into a partitioned table when the target is a foreign
table.

First observed the error when trying to have cstore_fdw tables as partitions
of a regular table. Reproduced the problem with postgres_fdw too.

Details
- create table ptest(a int, b int) partition by range (a);
- create table pt1 partition of ptest for values from (1) to (10);
- create foreign table pt2 partition of ptest for values from (11) to (20)
server foreign_server;

- insert into ptest values (1, 2) ---> works
- insert into ptest values (11, 12) --> fails with mentioned error
message.

I had successfully reproduced this for cstore_fdw and postgres_fdw servers.
Insert works fine if I try to insert into partition table directly.



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

pgsql-bugs by date:

Previous
From: scott@deltaex.com
Date:
Subject: [BUGS] BUG #14758: Segfault with logical replication on a function index
Next
From: Amit Langote
Date:
Subject: Re: [BUGS] BUG #14759: insert into foreign data partitions fail