code SQL0053 · recovery transient — an unchanged retry can succeed; retry machinery retries on its backoff schedule
the log line · Report this thread
As it arrives in your log or error chain — the values are your call's own:
could not take a lock needed by the migration step -- end the blocking session (pg_stat_activity), then run the migration again [SQL0053]
Transactional migration steps run under a 2-second lock_timeout. A step
whose DDL waits longer than that for a lock — another session holds a
conflicting one — rolls back whole and retries on the backoff schedule.
This error surfaces when the contention outlasts the schedule: something
held the lock the entire time, usually a long-running query or a session
idle in transaction.
ACCEPTED ANSWER Posted: 2026-09-09
end the blocking session (pg_stat_activity), then run the migration again
Nothing pasted yet — the queries above show their blanks.
Looking for a different code? Search every thread.