Re:PostgreSQL Locking Revealed
by Animats on Monday November 09, 2015 @02:17AM
(#10531751)
I notice they mention advisory locks, which aren't used much. MySQL has them, too. They're useful for such things as preventing two copies of the same application from running. This works across machine boundaries, and if you lose the database connection or the client machine or the host machine, the lock is released, so you don't have all that nonsense about Linux/UNIX lock files hanging around.
I use those for tasks that should only have one copy running on a cluster, but any machine in the cluster can run.
I use those for tasks that should only have one copy running on a cluster, but any machine in the cluster can run.