https://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
By Ivan Rabotyga
From basics to the enterprise: Transaction, locks, patterns