On 3/5/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
I recently had this code in my systemhandle 1- select * from account where id = 1; handle 2- update visit set visit_count= visit_count+1 where account_id = 1; # account_id fkeys on account it took me forever to realize why my system kept locking. the select + transaction on handle 1 was getting an exclusive lock, and the update was queued , trying to do an internal select on the fkey for integrity checks
I'm no Postgres expert, but I don't think a SELECT should block an UPDATE in an MVCC database system unless the first statement is a SELECT FOR UPDATE or similar. Maybe if you use an isolation level of REPEATABLE READ. - Perrin
