Does Microsoft SQL Server offer an Advisory Locks feature like Postgres?
Application locks. They are arbitrary locks held by the engine on behalf of the app. Acquired with sp_getapplock and released with sp_releaselock (if needed). Shared, Update, Exclusive and intent modes with the usual compatibility matrix. Can have transaction or session scope. The behavior matches the PG advisory locks in every aspect, but is a stored procedure, not a function (so it cannot be used inline in a SELECT, for instance).