Databases · Senior · Question 12 of 75

What are advisory locks in PostgreSQL?

Explanation

pg_try_advisory_lock(key) returns false if someone else holds it. Session-level locks must be released explicitly; with poolers in transaction mode, prefer transaction-level ones.

Further reading

Problem with a question

Databases · Senior · question 12

Test yourself

Take the Databases · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz