Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Index isn't a safe operation in Postgres. #98

Closed
NavindrenBaskaran opened this issue Nov 22, 2019 · 1 comment
Closed

Removing Index isn't a safe operation in Postgres. #98

NavindrenBaskaran opened this issue Nov 22, 2019 · 1 comment

Comments

@NavindrenBaskaran
Copy link

Strong Migration considers removing index non-concurrently as a safe operation in contrast to what's stated in the postgres documentation. DROP INDEX command will acquire an exclusive lock block inserts, updates and deletes on that locked table. If we agree, i will be make the necessary changes for this.

ankane added a commit that referenced this issue Nov 22, 2019
@ankane
Copy link
Owner

ankane commented Nov 22, 2019

Hey @NavindrenBaskaran, thanks for the suggestion. I've actually been considering this in #95 as an optional check and had it mostly written. This operation does lock the table, but like add_column, the lock is very brief, so I don't think it should be enabled by default (from personal experience, I haven't had issues with this on very large, active databases, but can see how it's possible with different workloads).

@ankane ankane closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants