https://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS
By Ivan Rabotyga
От букваря до кровавого энтерпрайза: транзакции, локи, паттерны