Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-07 Thread Etsuro Fujita
On 2017/09/08 0:21, Robert Haas wrote: On Thu, Sep 7, 2017 at 5:13 AM, Etsuro Fujita wrote: On 2017/08/30 17:20, Etsuro Fujita wrote: Here is a patch to skip the CheckValidResultRel checks for a target table if it's a foreign partition to perform tuple-routing

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-07 Thread Robert Haas
On Thu, Sep 7, 2017 at 5:13 AM, Etsuro Fujita wrote: > On 2017/08/30 17:20, Etsuro Fujita wrote: >> Here is a patch to skip the CheckValidResultRel checks for a target table >> if it's a foreign partition to perform tuple-routing for, as proposed by >> Robert. > > In

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-07 Thread Etsuro Fujita
On 2017/08/30 17:20, Etsuro Fujita wrote: Here is a patch to skip the CheckValidResultRel checks for a target table if it's a foreign partition to perform tuple-routing for, as proposed by Robert. In the patch, to skip the checks, I passed to CheckValidResultRel a new flag indicating whether

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-05 Thread Etsuro Fujita
On 2017/08/30 17:20, Etsuro Fujita wrote: On 2017/08/30 9:13, Amit Langote wrote: On 2017/08/29 20:18, Etsuro Fujita wrote: On 2017/08/25 22:26, Robert Haas wrote: On Wed, Aug 23, 2017 at 4:55 AM, Etsuro Fujita wrote: Agreed, but I'd vote for fixing this in v10

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-30 Thread Etsuro Fujita
On 2017/08/30 9:13, Amit Langote wrote: On 2017/08/29 20:18, Etsuro Fujita wrote: On 2017/08/25 22:26, Robert Haas wrote: On Wed, Aug 23, 2017 at 4:55 AM, Etsuro Fujita wrote: Agreed, but I'd vote for fixing this in v10 as proposed; I agree that just ripping the

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-29 Thread Amit Langote
On 2017/08/29 20:18, Etsuro Fujita wrote: > On 2017/08/25 22:26, Robert Haas wrote: >> On Wed, Aug 23, 2017 at 4:55 AM, Etsuro Fujita >> wrote: >>> Agreed, but I'd vote for fixing this in v10 as proposed; I agree that just >>> ripping the CheckValidResultRel checks

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-29 Thread Etsuro Fujita
On 2017/08/25 22:26, Robert Haas wrote: On Wed, Aug 23, 2017 at 4:55 AM, Etsuro Fujita wrote: Agreed, but I'd vote for fixing this in v10 as proposed; I agree that just ripping the CheckValidResultRel checks out entirely is not a good idea, but that seems OK to me

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-25 Thread Robert Haas
On Wed, Aug 23, 2017 at 4:55 AM, Etsuro Fujita wrote: > Agreed, but I'd vote for fixing this in v10 as proposed; I agree that just > ripping the CheckValidResultRel checks out entirely is not a good idea, but > that seems OK to me at least as a fix just for v10. I'm

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-23 Thread Etsuro Fujita
On 2017/08/22 9:55, Amit Langote wrote: On 2017/08/22 1:08, Robert Haas wrote: On Mon, Aug 21, 2017 at 7:45 AM, Etsuro Fujita wrote: If there are no objections, I'll add this to the open item list for v10. This seems fairly ad-hoc to me. I mean, now you have

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-21 Thread Amit Langote
On 2017/08/22 1:08, Robert Haas wrote: > On Mon, Aug 21, 2017 at 7:45 AM, Etsuro Fujita > wrote: >> If there are no objections, I'll add this to the open item list for v10. > > This seems fairly ad-hoc to me. I mean, now you have > CheckValidResultRel not being

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-21 Thread Robert Haas
On Mon, Aug 21, 2017 at 7:45 AM, Etsuro Fujita wrote: > If there are no objections, I'll add this to the open item list for v10. This seems fairly ad-hoc to me. I mean, now you have CheckValidResultRel not being called in just this one case -- but that bypasses all

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-21 Thread Etsuro Fujita
On 2017/08/07 15:45, Etsuro Fujita wrote: On 2017/08/07 15:33, Amit Langote wrote: On 2017/08/07 15:22, Etsuro Fujita wrote: On 2017/08/07 13:11, Amit Langote wrote:> The patch looks good too. Although, looking at the following hunk: + Assert(partrel->rd_rel->relkind ==

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-07 Thread Etsuro Fujita
On 2017/08/07 15:33, Amit Langote wrote: On 2017/08/07 15:22, Etsuro Fujita wrote: On 2017/08/07 13:11, Amit Langote wrote:> The patch looks good too. Although, looking at the following hunk: + Assert(partrel->rd_rel->relkind == RELKIND_RELATION || +

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-07 Thread Amit Langote
On 2017/08/07 15:22, Etsuro Fujita wrote: > On 2017/08/07 13:11, Amit Langote wrote:> The patch looks good too. > Although, looking at the following hunk: >> >> + Assert(partrel->rd_rel->relkind == RELKIND_RELATION || >> +partrel->rd_rel->relkind == RELKIND_FOREIGN_TABLE);

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-07 Thread Etsuro Fujita
On 2017/08/07 13:11, Amit Langote wrote:> The patch looks good too. Although, looking at the following hunk: + Assert(partrel->rd_rel->relkind == RELKIND_RELATION || + partrel->rd_rel->relkind == RELKIND_FOREIGN_TABLE); + /*

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-06 Thread Amit Langote
Fujita-san, On 2017/08/07 12:45, Etsuro Fujita wrote: > Hi, > > I noticed that tuple-routing for partitioned tables that contain > non-writable foreign partitions doesn't work as expected. Here is an > example: > > postgres=# create extension file_fdw; > postgres=# create server file_server

[HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-08-06 Thread Etsuro Fujita
Hi, I noticed that tuple-routing for partitioned tables that contain non-writable foreign partitions doesn't work as expected. Here is an example: postgres=# create extension file_fdw; postgres=# create server file_server foreign data wrapper file_fdw; postgres=# create user mapping for