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

V1 of django-pgmigrate #1

Merged
merged 1 commit into from
Oct 25, 2022
Merged

V1 of django-pgmigrate #1

merged 1 commit into from
Oct 25, 2022

Conversation

wesleykendall
Copy link
Member

django-pgmigrate helps you avoid costly downtime with Postgres migrations and provides the following features to alleviate problematic locking scenarios when running migrations:

  • Detect blocking queries and terminate them automatically.
  • Print blocking queries so that you can inspect and terminate them manually.
  • Set the lock timeout so that migrations are terminated if they block too long.

Type: api-break

@wesleykendall
Copy link
Member Author

Note that the PR will fail until django-pglock V1 is deployed

* Detect blocking queries and terminate them automatically.
* Print blocking queries so that you can inspect
and terminate them manually.
* Set the lock timeout so that migrations are terminated if they block too long.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Production experience makes me think having the statement timeout around a migration would be useful too. I have often seen devs push code where the migration easily gets the lock, but the migration itself ends up taking much longer than expected/taking locks in areas one would not expect (thus can end up blocking all other queries). Having the statement timeout here is a good fall back.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I think that would be a nice configuration option. I added a feature request to the issue board - #2

Should be easy to add. Just trying to keep the first PR small

``django-pgmigrate`` helps you avoid costly downtime with Postgres migrations
and provides the following features to alleviate problematic locking
scenarios when running migrations:

* Detect blocking queries and terminate them automatically.
* Print blocking queries so that you can inspect
  and terminate them manually.
* Set the lock timeout so that migrations are terminated if they block too long.

Type: api-break
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

Successfully merging this pull request may close these issues.

2 participants