News for hackers. Stuff that matters.
Re:Distributed locking with Postgres advisory locks by quelltext on Monday January 24, 2022 @06:44AM (#30056380)
I guess for the particular use case the simple string hash works. In the worst case you lock a few more likely unrelated users.

However, in some cases you want to enact a specific locking order on some objects that interact, and in particular if locks aren't reentrant, I'd be cautious and at least use a cryptographic hash here to reduce likelihood if collisions.

There are no comments on this comment yet.