pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Ouchterlony <ragnar.ouchterlony@agama.tv>
To: Amit Langote <amitlangote09@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Problem with declarative partitioning and COPY FROM
Date: Wed, 11 Jan 2017 15:58:14 +0100
Message-ID: <732dfc84-25f5-413c-1eee-0bfa7a370093@agama.tv> (raw)
In-Reply-To: <CA+HiwqFWQ7q5xjiYDT6yTH3xtYu8tRuRiACc2KCQighqCm73GQ@mail.gmail.com>
References: <16d73804-c9cd-14c5-463e-5caad563ff77@agama.tv>
	<CA+HiwqFWQ7q5xjiYDT6yTH3xtYu8tRuRiACc2KCQighqCm73GQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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 "=="?

I have tested using that change and now I get the results I expect.

/Ragnar Ouchterlony, Agama Technologies


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



view thread (5+ messages)  latest in thread

Message-ID: <732dfc84-25f5-413c-1eee-0bfa7a370093@agama.tv>
Permalink:  ../732dfc84-25f5-413c-1eee-0bfa7a370093@agama.tv/
Also on:    postgresql.org/message-id/732dfc84-25f5-413c-1eee-0bfa7a370093@agama.tv

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ragnar.ouchterlony@agama.tv, amitlangote09@gmail.com
  Subject: Re: Problem with declarative partitioning and COPY FROM
  In-Reply-To: <732dfc84-25f5-413c-1eee-0bfa7a370093@agama.tv>
  References: <16d73804-c9cd-14c5-463e-5caad563ff77@agama.tv> <CA+HiwqFWQ7q5xjiYDT6yTH3xtYu8tRuRiACc2KCQighqCm73GQ@mail.gmail.com> <732dfc84-25f5-413c-1eee-0bfa7a370093@agama.tv>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox