cstore_fdw icon indicating copy to clipboard operation
cstore_fdw copied to clipboard

Concurrent Drop Table & Truncate Table commands during COPY

Open onderkalaci opened this issue 10 years ago • 0 comments

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.)

onderkalaci avatar Jan 14 '16 09:01 onderkalaci