Re: Declarative partitioning - another take

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Declarative partitioning - another take
Date: 2016-10-05 08:59:04
Message-ID: 5dded2f1-c7f6-e7fc-56b5-23ab59495e4b@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers


Hi,

On 2016/10/05 16:57, Rajkumar Raghuwanshi wrote:
> I observed, when creating foreign table with range partition, data is not
> inserting into specified partition range. below are steps to reproduce.
>
> [ ... ]
>
> postgres=# INSERT INTO test_range (a) values (5),(25),(15);
> INSERT 0 3
>
> postgres=# select tableoid::regclass, * from test_range;
> tableoid | a
> ------------------+----
> ft_test_range_p1 | 5
> ft_test_range_p2 | 15
> ft_test_range_p3 | 25
> (3 rows)
>
> --Here ft_test_range_p2 is created for range 20-30 having value 15.

Thanks a lot for testing.

That's a bug. I found that it is caused by the FDW plans getting paired
with the wrong result relations during ExecInitModifyTable() initialization.

I will include a fix for the same in the patch set that I will be sending
soon in reply to Robert's review comments on patch 0002 [1].

Thanks,
Amit

[1]
https://www.postgresql.org/message-id/CA%2BTgmoY1aQ5iPz0S2GBJw4YUR1Z2Qg5iKUf8YJSo2Ctya4ZmNg%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2016-10-05 09:03:42 Re: pgbench more operators & functions
Previous Message Oleg Bartunov 2016-10-05 08:15:46 Re: [PATCH] Generic type subscription