log_lock_waits was added in PostgreSQL 8.3.
The default value for
Log message caused by
TRUNCATE waiting on another transaction:
[2020-10-14 14:10:03 UTC] psql postgres postgres LOG: 00000: process 24105 still waiting for AccessExclusiveLock on relation 16451 of database 16384 after 1000.053 ms [2020-10-14 14:10:03 UTC] psql postgres postgres DETAIL: Process holding the lock: 17256. Wait queue: 24105.
Wait queue is a list of backend PIDs waiting to acquire a lock on the relation, ordered by time of acquisition attempt.