Fix issue #5 by using a deterministic hash function

Fix issue #5 by using a deterministic hash function to generate a lock id for Postgres.