From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: tableam: Add table_finish_bulk_insert().
Date: Mon, 01 Apr 2019 21:45:20 +0000
Message-ID: <E1hB4k4-0000Y0-4s@gemulon.postgresql.org> (raw)
tableam: Add table_finish_bulk_insert().
This replaces the previous calls of heap_sync() in places using
bulk-insert. By passing in the flags used for bulk-insert the AM can
decide (first at insert time and then during the finish call) which of
the optimizations apply to it, and what operations are necessary to
finish a bulk insert operation.
Also change HEAP_INSERT_* flags to TABLE_INSERT, and rename hi_options
to ti_options.
These changes are made even in copy.c, which hasn't yet been converted
to tableam. There's no harm in doing so.
Author: Andres Freund
Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d45e40158623baacd3f36f92a670d435cc1e845f
Modified Files
--------------
src/backend/access/heap/heapam_handler.c | 12 +++++++++++
src/backend/commands/copy.c | 35 ++++++++++++++------------------
src/backend/commands/createas.c | 14 ++++++-------
src/backend/commands/matview.c | 15 +++++++-------
src/backend/commands/tablecmds.c | 16 +++++++--------
src/include/access/tableam.h | 32 ++++++++++++++++++++++++++++-
6 files changed, 78 insertions(+), 46 deletions(-)
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-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: tableam: Add table_finish_bulk_insert().
In-Reply-To: <E1hB4k4-0000Y0-4s@gemulon.postgresql.org>
References: <E1hB4k4-0000Y0-4s@gemulon.postgresql.org>
* 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