row level locking?

From: "Jeff Barrett" <jbarrett(at)familynetwork(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: row level locking?
Date: 2001-09-10 15:25:07
Message-ID: 9nim69$1rhk$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have an update statement (no transaction controls surround these
statements):

update sessions set sessdate = 0 where sessid in ( long list of ids);

How long will the rows being updated be locked for this statement? Will all
be locked until all updates are completed or will the row locking only occur
for each row being updated?

If I have a statement like:

update sessions set sessdate = 0 where datetime < 10000; (this would be the
same criteria that created the list used above)

How long will each row be locked for?

These queries can be updating a good number of rows ( > 10,000) every 10
minutes and I need to figure out how signifigant of an impact the locking
occuring in those updates can be.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Barrett 2001-09-10 16:14:13 calling a shell script from pl/pgsql
Previous Message jack 2001-09-10 07:47:35 array variable in pl/pgsql