Re:Show HN: Postgres Query Lock Explainer
by miohtama on Wednesday May 17, 2023 @06:49PM
(#35982215)
Related to this: would anyone know how to figure out which 1) applications and 2) queries where holidng locks after a dead lock happened, post mortem? As the default PSQL deadlock log output is very sparse to the point being useless.
[ Parent
| on HN ]
Re:Show HN: Postgres Query Lock Explainer
by dboreham on Wednesday May 17, 2023 @08:10PM
(#35982785)
The deadlocking pids will be logged and then if you have/had query logging turned on you can see what the pids were executing prior to that. Tracing back to the application involves using the available logged information: client IP, client name (possibly just the default from the pq driver, so the same everywhere), content of the actual query.