citusdata / citusdata/cstore_fdw
Concurrent Drop Table & Truncate Table commands during COPY
- Dominant language
- C
- Stars
- 1.8k
- Forks
- 169
- PR merge metrics
- No merged PRs in 30d
Description
It seems we have a minor issue on concurrently dropping & truncating tables.
Steps to reproduce:
- Follow the instrcutions on the README to create `customer_reviews` table.
- Run a long running `\COPY` command
- While `\COPY` is in progress issue 2 `TRUNCATE TABLE customer_reviews` and 2 `DROP TABLE customer_reviews` on 4 different psql consoles (or use `pgbench`)
- see the following in the outputs of some of the commands:
```
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.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.