Re: Problem with declarative partitioning and COPY FROM

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Ragnar Ouchterlony <ragnar(dot)ouchterlony(at)agama(dot)tv>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problem with declarative partitioning and COPY FROM
Date: 2017-01-12 01:38:15
Message-ID: CA+HiwqH8movQjdRM=eSfAAppTMJqvbZPgF234s3WfS3q8rW+oQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jan 11, 2017 at 11:58 PM, Ragnar Ouchterlony
<ragnar(dot)ouchterlony(at)agama(dot)tv> wrote:
> On 2017-01-11 13:24, Amit Langote wrote:
>>
>> There's a bug and has been reported on the -hackers mailing list as
>> well. Please try your example after applying the patch 0002 attached
>> with the following email:
>>
>> https://www.postgresql.org/message-id/01bc4745-bac8-a033-96a1-8a42b45d2fc1%40lab.ntt.co.jp
>
>
> Ok, that is good!
>
> I tested the patch as is, but it did not make a difference. Then I read the
> patch more carefully.
>
> + /*
> + * FIXME: We don't engage the bulk-insert mode for partitioned
> tables,
> + * because the the heap relation is most likely change from one row
> to
> + * next due to tuple-routing.
> + */
> + if (cstate->rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
> + bistate = GetBulkInsertState();
>
>
> The if-statement does not match how I read the comment. That is, shouldn't
> it be "!=" rather than "=="?

Oops, you're right. Will update the patch posted on -hackers.

Thanks,
Amit

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message maxandreogeret 2017-01-12 09:47:50 BUG #14493: psql command : Unable to use set with \copy
Previous Message Michael Paquier 2017-01-12 01:09:03 Re: BUG #14492: Foreign Table import from SQL Server 2005