From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Let table AM insertion methods control index insertion
Date: Sat, 30 Mar 2024 20:54:54 +0000
Message-ID: <E1rqfj4-006YS8-Ji@gemulon.postgresql.org> (raw)
Let table AM insertion methods control index insertion
Previously, the executor did index insert unconditionally after calling
table AM interface methods tuple_insert() and multi_insert(). This commit
introduces the new parameter insert_indexes for these two methods. Setting
'*insert_indexes' to true saves the current logic. Setting it to false
indicates that table AM cares about index inserts itself and doesn't want the
caller to do that.
Discussion: https://postgr.es/m/CAPpHfdurb9ycV8udYqM%3Do0sPS66PJ4RCBM1g-bBpvzUfogY0EA%40mail.gmail.com
Reviewed-by: Pavel Borisov, Matthias van de Meent, Mark Dilger
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b1484a3f1910bfd0e254afe40085dfc3351bda8c
Modified Files
--------------
src/backend/access/heap/heapam.c | 4 +++-
src/backend/access/heap/heapam_handler.c | 4 +++-
src/backend/access/table/tableam.c | 6 ++++--
src/backend/catalog/indexing.c | 4 +++-
src/backend/commands/copyfrom.c | 13 +++++++++----
src/backend/commands/createas.c | 4 +++-
src/backend/commands/matview.c | 4 +++-
src/backend/commands/tablecmds.c | 6 +++++-
src/backend/executor/execReplication.c | 6 ++++--
src/backend/executor/nodeModifyTable.c | 6 ++++--
src/include/access/heapam.h | 2 +-
src/include/access/tableam.h | 25 ++++++++++++++++++-------
12 files changed, 60 insertions(+), 24 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Let table AM insertion methods control index insertion
In-Reply-To: <E1rqfj4-006YS8-Ji@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