You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing that I found missing in django-pglocks was the support for transaction level advisory locks in postgres.
I couldn't find these here either.
Is there a plan to include these in the future?
There isn't a plan. I'm not necessarily opposed, it would just be a matter of calling a different function. What's the use case? Do you just want the "rollback" semantics so that the lock drops when the transaction drops?
The text was updated successfully, but these errors were encountered:
Is there a reason you preferred the pg_advisory_lock over pg_advisory_xact_lock
In my reading and use cases, advisory locks are not typically used to guard database work. I'm under the impression that if it's database work that needs locking, then there are better and more precise locking semantics available in PostgreSQL for that. So, really, it just never occurred to me to use pg_advisory_xact_lock because I assumed there would never be a transaction in scope. In fact, for our use cases, the connection pool for our locking is completely different from the one we use for database queries.
You are welcome to create a PR for this support, I'm not opposed to adding it.
@yudistrange asked in #29 (comment):
There isn't a plan. I'm not necessarily opposed, it would just be a matter of calling a different function. What's the use case? Do you just want the "rollback" semantics so that the lock drops when the transaction drops?
The text was updated successfully, but these errors were encountered: