Skip site navigation (1) Skip section navigation (2)

Re: Can pessimistic locking be emulated?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can pessimistic locking be emulated?
Date: 2003-02-27 23:16:40
Message-ID: 200302271516.40835.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Merlin,

Just as a suggestion:  In most of my applications, we have a security layer 
which is implemented through server-side functions.  These functions keep a 
table updated which contains:

lock_table
record_id
lock_user
time_locked

This allows us to avoid nasty "your update cannot be processed"-type error 
messages by showing the user up front which records are locked, as well as 
allowing the admin to decide when locks should "time out".

I tend to find in general that database locking mechanisms are a very poor 
locking strategy for a good UI.

-- 
Josh Berkus
josh(at)agliodbs(dot)com
Aglio Database Solutions
San Francisco

pgsql-hackers by date

Next:From: Justin CliftDate: 2003-02-27 23:46:56
Subject: Re: analyze after a database restore?
Previous:From: Alvaro HerreraDate: 2003-02-27 22:44:11
Subject: Re: analyze after a database restore?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group