Re: Which SQL command creates ExclusiveLock? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Which SQL command creates ExclusiveLock?
Date
Msg-id 22918.1083125788@sss.pgh.pa.us
Whole thread Raw
In response to Which SQL command creates ExclusiveLock?  ("Denis Khabas" <dkhabas@bluecatnetworks.com>)
List pgsql-sql
"Denis Khabas" <dkhabas@bluecatnetworks.com> writes:
> According to postgres documentation, all update operations place ROW EXCLUS=
> IVE MODE locks, and=20
> EXCLUSIVE MODE is not automatically acquired by any postgres SQL command. S=
> o, which command places
> ExclusiveLock?

It says that no SQL command acquires ExclusiveLock *on a table*.  The
pg_locks row you show represents ExclusiveLock on a transaction number.
Every transaction gets ExclusiveLock on its transaction number for the
duration of its existence.
        regards, tom lane


pgsql-sql by date:

Previous
From: Ray Jackson
Date:
Subject: date arithmetic over calender year boundaries
Next
From: "kumar"
Date:
Subject: Re: Customised Encoding