cstore_fdw
cstore_fdw copied to clipboard
Concurrent Drop Table & Truncate Table commands during COPY
It seems we have a minor issue on concurrently dropping & truncating tables.
Steps to reproduce:
- Follow the instrcutions on the README to create
customer_reviewstable. - Run a long running
\COPYcommand- While
\COPYis in progress issue 2TRUNCATE TABLE customer_reviewsand 2DROP TABLE customer_reviewson 4 different psql consoles (or usepgbench) - see the following in the outputs of some of the commands:
- While
postgres=# truncate TABLE customer_reviews;
ERROR: deadlock detected
DETAIL: Process 11881 waits for AccessExclusiveLock on relation 32405 of database 12641; blocked by process 11868.
Process 11868 waits for AccessExclusiveLock on relation 32405 of database 12641; blocked by process 11881.
HINT: See server log for query details.
postgres=#
The same steps does not lead to deadlocks on regular postgres table.
(Note: We first hit this issue in #67) (Note: Only concurrent TRUNCATEs or DROPs does not lead to any deadlocks in either cstore_fdw or regular postgres tables.)