aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/copy.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index ac07f75bc36..6d53dc463c1 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -1081,13 +1081,8 @@ DoCopy(ParseState *pstate, const CopyStmt *stmt,
EndCopyTo(cstate);
}
- /*
- * Close the relation. If reading, we can release the AccessShareLock we
- * got; if writing, we should hold the lock until end of transaction to
- * ensure that updates will be committed before lock is released.
- */
if (rel != NULL)
- table_close(rel, (is_from ? NoLock : AccessShareLock));
+ table_close(rel, NoLock);
}
/*