8. SQL Statements : COPY : Locking
 
Share this page                  
Locking
When copying from a table into a file, the DBMS Server takes a shared lock on the table.
When performing a bulk copy into a table, the DBMS Server takes an exclusive lock on the table. Because bulk copy cannot start until it gets an exclusive lock, this operation can be delayed due to lock contention.
When performing a non-bulk copy into a table, the DBMS server takes an “intent exclusive” lock on the table, and uses insert to update the table. As a result, the operation can be aborted due to deadlock.