↑↓ 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_lock_shared

Read the PG 18 manual

Obtains a shared session-level advisory lock if available.

Reading PG 18current·documented in 21 of 27 versions, 8.2 to 20

Signatures & examples

pg_try_advisory_lock_shared ( key bigint ) → boolean
Obtains a shared session-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_lock_shared ( key1 integer, key2 integer ) → boolean
Obtains a shared session-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 3
  1. 12 → 13 changed
  2. 9.0 → 9.1 changed
  3. 8.1 → 8.2 added

Definition snapshot: b7bd9cda · English manual source