locks and "select for update"

From: Wayne Cuddy <lists-pgsql(at)useunix(dot)net>
To: PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: locks and "select for update"
Date: 2012-08-31 17:05:54
Message-ID: 20120831170554.GA32084@slacker.ja10629.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

The documentation about concurrency states that all the different types
of locks are table locks even if the word row appears in the lock name.

The documentation about select statements states that when "for update
of" is used that only the selected rows will be locked. Is this true or
does this really mean that when any target row is found the entire table
is locked until the end of the transaction?

Thanks,
Wayne

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2012-08-31 19:28:05 Re: locks and "select for update"
Previous Message Yelai, Ramkumar IN BLR STS 2012-08-31 14:55:50 Need to Iterate the record in plpgsql