Re: this is in plain text (row level locks) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: this is in plain text (row level locks)
Date
Msg-id 11640.1060110130@sss.pgh.pa.us
Whole thread Raw
In response to Re: this is in plain text (row level locks)  ("Jenny -" <nat_lazy@hotmail.com>)
List pgsql-hackers
"Jenny -" <nat_lazy@hotmail.com> writes:
> so even though the application locks a row in a table, table-level locks are 
> automatically taken by postgesql ? why is that?

So that the table doesn't disappear while you're trying to scan it.  (Or
afterwards --- a row-level lock wouldn't be noticed by DROP TABLE.)

Note that AccessShareLock is a pretty weak kind of lock, and holding it
does not prevent most other operations.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: logging stuff
Next
From: Tom Lane
Date:
Subject: Re: TODO: trigger features