On Sun, 2026-11-29 at 23:28 -0500, Justin wrote:
> Use of explicit locking is highly discouraged.

I have to disagree with that.  I'd say it depends a lot on your use case.
If collisions are frequent, optimistic locking will lead to a lot of
transactions being repeated, which hurts performance and throughput and
creates more work for autovacuum.
As long as the transactions are short, pessimistic locking is a better
approach in that case.

Yours,
Laurenz Albe


Reply via email to