3 ms·
Advisory locks have many pitfalls, see [0]. AFAIK the only correct way to do what you probably thought you were doing is "EXCLUSIVE" or "ACCESS EXCLUSIVE"... o
by Quekid5 2y ago
Advisory locks have many pitfalls, see [0].
AFAIK the only correct way to do what you probably thought you were doing is "EXCLUSIVE" or "ACCESS EXCLUSIVE"... or two-phase commit or idempotency for the operations you're doing.
[0] https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES https://www.postgresql.org/docs/current/explicit-locking.htm...
- skrause 2y agoYou link to table level locks which are different from advisory locks: https://www.postgresql.org/docs/current/explicit-locking.html#ADVISORY-LOCKS https://www.postgresql.org/docs/current/explicit-locking.htm... Are you sure that you're talking about the same locks? What are the pitfalls exactly?