I found this sql for analyze locks in DB.
But it shows me locks only on 1 DB, but there are a lot of DBs, so this is not working 100% full.
I found this information.
pg_locks provides a global view of all locks in the database cluster, not only those relevant to the current database. Although its relation column can be joined against pg_class.oid to identify locked relations, this will only work correctly for relations in the current database (those for which the database column is either the current database's OID or zero).
How can I get output for all locks of all DBs?