Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Recommend remove_index concurrently with ddl transaction disabled #27

Open
shuber opened this issue Jul 25, 2018 · 0 comments
Open

Recommend remove_index concurrently with ddl transaction disabled #27

shuber opened this issue Jul 25, 2018 · 0 comments

Comments

@shuber
Copy link
Contributor

shuber commented Jul 25, 2018

https://www.postgresql.org/docs/current/static/sql-dropindex.html

CONCURRENTLY

Drop the index without locking out concurrent selects, inserts, updates, and deletes on the index's table. A normal DROP INDEX acquires exclusive lock on the table, blocking other accesses until the index drop can be completed. With this option, the command instead waits until conflicting transactions have completed.

There are several caveats to be aware of when using this option. Only one index name can be specified, and the CASCADE option is not supported. (Thus, an index that supports a UNIQUE or PRIMARY KEY constraint cannot be dropped this way.) Also, regular DROP INDEX commands can be performed within a transaction block, but DROP INDEX CONCURRENTLY cannot.```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant