aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/copy.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2019-07-02 03:07:15 +1200
committerDavid Rowley <drowley@postgresql.org>2019-07-02 03:07:15 +1200
commitb2d69806d8cc902802a7b56ba37fb7c55e58b0ed (patch)
treebf4333eb779694df651a25e36bea9ea449fa8207 /src/backend/commands/copy.c
parent4de60244e2fcdeb100afc7f8bf5c28b32923a637 (diff)
downloadpostgresql-b2d69806d8cc902802a7b56ba37fb7c55e58b0ed.tar.gz
postgresql-b2d69806d8cc902802a7b56ba37fb7c55e58b0ed.zip
Remove surplus call to table_finish_bulk_insert
4de60244e added the call to table_finish_bulk_insert to the CopyMultiInsertBufferCleanup function. We use a CopyMultiInsertBuffer even for non-partitioned tables, so having the cleanup do that meant we would call table_finsh_bulk_insert twice when performing COPY FROM with a non-partitioned table. Here we can just remove the direct call in CopyFrom and let CopyMultiInsertBufferCleanup handle the call instead.
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r--src/backend/commands/copy.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index c4dfbdacdf3..a4eee4c0d74 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -3369,8 +3369,6 @@ CopyFrom(CopyState cstate)
if (insertMethod != CIM_SINGLE)
{
- table_finish_bulk_insert(cstate->rel, ti_options);
-
/* Tear down the multi-insert buffer data */
CopyMultiInsertInfoCleanup(&multiInsertInfo);
}