5 ms·
Shameless plug: I wrote a tool[1] that executes a given migration against a test database (e.g. in your CI) and reports back what locks it acquired. The ration
by pasxizeis 1y ago
Shameless plug: I wrote a tool[1] that executes a given migration against a test database (e.g. in your CI) and reports back what locks it acquired.
The rationale being to have a "lock diagnostics report" commented in your PR's migration file.
It's a prototype and has a few rough edges and missing functionality, but feedback is more than welcome.
[1] https://github.com/agis/pglockanalyze https://github.com/agis/pglockanalyze
- jononor 1y agoVery practical! Locking is one of the things that can really bite when doing migrations.