BUG #14759: insert into foreign data partitions fail

From: mtuncer(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Cc: mtuncer(at)gmail(dot)com
Subject: BUG #14759: insert into foreign data partitions fail
Date: 2017-07-24 21:28:15
Message-ID: 20170724212815.1456.54156@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

The following bug has been logged on the website:

Bug reference: 14759
Logged by: Murat Tuncer
Email address: mtuncer(at)gmail(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2017-07-25 00:19:24 Re: BUG #14759: insert into foreign data partitions fail
Previous Message scott 2017-07-24 07:22:40 BUG #14758: Segfault with logical replication on a function index

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Rofail 2017-07-24 21:31:21 Re: GSoC 2017: Foreign Key Arrays
Previous Message Erik Rijkers 2017-07-24 21:25:24 Re: GSoC 2017: Foreign Key Arrays