Reputation: 45943
Pessimistic Lock creates a transaction. What happens if there is an error during the transaction and it does not complete?
Using PostgreSQL.
Upvotes: 0
Views: 88
Reputation: 2310
The transaction is aborted and the lock is released. Since the transaction is aborted, no updates made in the transaction prior to the exception are committed.
http://www.postgresql.org/docs/9.1/static/explicit-locking.html
Upvotes: 1