by candiddevmike · 2y ago · 0 comments
Postgres allows obtaining advisory locks at either the session _or_ transaction level. If it's session-level, then you have, ergo, a connection-level lock.
https://www.postgresql.org/docs/current/explicit-locking.htm...
And if you add something like pgBouncer or whatever, this should still work but a session lock would fuck things up.