Skip to content

PostgresMigrations: Don't block on migration lock#5211

Merged
akshaymankar merged 4 commits intodevelopfrom
better-locking
Apr 30, 2026
Merged

PostgresMigrations: Don't block on migration lock#5211
akshaymankar merged 4 commits intodevelopfrom
better-locking

Conversation

@akshaymankar
Copy link
Copy Markdown
Member

@akshaymankar akshaymankar commented Apr 30, 2026

This causes deadlocks with another process running the same migration of CREATE INDEX CONCURRENTLY because this query waits on all transactions to be complete.

https://wearezeta.atlassian.net/browse/WPB-22832

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

This causes deadlocks with another process running the same migration of `CREATE
INDEX CONCURRENTLY` because this query waits on all transactions to be complete.
@akshaymankar akshaymankar requested review from a team as code owners April 30, 2026 11:49
@akshaymankar akshaymankar changed the title PostgresMigrations: Don't block on mgiration lock PostgresMigrations: Don't block on migration lock Apr 30, 2026
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Apr 30, 2026
Comment thread libs/wire-subsystems/src/Wire/PostgresMigrations.hs Outdated
akshaymankar and others added 2 commits April 30, 2026 13:58
Co-authored-by: Sven Tennie <sven.tennie@wire.com>
Comment thread libs/wire-subsystems/src/Wire/PostgresMigrations.hs Outdated
Copy link
Copy Markdown
Contributor

@supersven supersven left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@akshaymankar akshaymankar merged commit 1c3f20e into develop Apr 30, 2026
10 checks passed
@akshaymankar akshaymankar deleted the better-locking branch April 30, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants