class GoodJob::PgLocks
def self.advisory_lock_details
Integer keys are displayed with the first key in the classid column, the second key in the objid column, and objsubid equal to 2.
The original bigint value can be reassembled with the expression (classid::bigint << 32) | objid::bigint.
A bigint key is displayed with its high-order half in the classid column, its low-order half in the objid column, and objsubid equal to 1.
Advisory locks can be acquired on keys consisting of either a single bigint value or two integer values.
https://www.postgresql.org/docs/9.6/view-pg-locks.html
def self.advisory_lock_details connection.select <<~SQL SELECT * FROM pg_locks WHERE locktype = 'advisory' AND objsubid = 1 SQL end