Re: Custom table AMs need to include heapam.h because of BulkInsertState

David Rowley <david.rowley@2ndquadrant.com>

From: David Rowley <david.rowley@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-07-17T23:29:37Z
Lists: pgsql-hackers
On Wed, 17 Jul 2019 at 06:46, Andres Freund <andres@anarazel.de> wrote:
> 1) Have ExecFindPartition() return via a bool* whether the partition is
>    being accessed for the first time. In copy.c push the partition onto
>    a list of to-be-bulk-finished tables.
> 2) Add a execPartition.c function that returns all the used tables from
>    a PartitionTupleRouting*.

#2 seems better than #1 as it does not add overhead to ExecFindPartition().

Are you thinking this should go back into v12, or just for v13 only?

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



Commits

  1. Fix missing calls to table_finish_bulk_insert during COPY, take 2

  2. Fix missing call to table_finish_bulk_insert during COPY