Re: Declarative partitioning vs. BulkInsertState

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: 高增琦 <pgf00a@gmail.com>, Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>, Amit Langote <amitlangote09@gmail.com>, Dmitry Ivanov <d.ivanov@postgrespro.ru>, Michael Paquier <michael.paquier@gmail.com>, Andres Freund <andres@anarazel.de>, Erik Rijkers <er@xs4all.nl>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Pg Hackers <pgsql-hackers@postgresql.org>, pgsql-hackers-owner@postgresql.org
Date: 2017-01-24T13:51:02Z
Lists: pgsql-hackers
On Mon, Jan 23, 2017 at 5:25 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> I tried implementing the second idea in the attached patch.  It fixes the
> bug (multiple reports as mentioned in the commit message) that tuples may
> be inserted into the wrong partition.

Looks good to me, thanks.  Committed with a few tweaks.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Commits

  1. Fix interaction of partitioned tables with BulkInsertState.

  2. Improve bulk-insert performance by keeping the current target buffer pinned