↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / System Administration Functions

pg_try_advisory_xact_lock

Read the PG 18 manual

Obtains an exclusive transaction-level advisory lock if available.

Reading PG 18current·documented in 17 of 27 versions, 9.1 to 20

Signatures & examples

pg_try_advisory_xact_lock ( key bigint ) → boolean
Obtains an exclusive transaction-level advisory lock if available. This will either obtain the lock immediately and return true, or return false without waiting if the lock cannot be acquired immediately.
pg_try_advisory_xact_lock ( key1 integer, key2 integer ) → boolean
Obtains an exclusive transaction-level advisory lock if available. This will either obtain the lock immediately and return true, or return false without waiting if the lock cannot be acquired immediately.
Version history 2
  1. 12 → 13 changed
  2. 9.0 → 9.1 added

Definition snapshot: b7bd9cda · English manual source