Re: Which SQL command creates ExclusiveLock?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Denis Khabas" <dkhabas(at)bluecatnetworks(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Which SQL command creates ExclusiveLock?
Date: 2004-04-28 04:16:28
Message-ID: 22918.1083125788@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Denis Khabas" <dkhabas(at)bluecatnetworks(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message kumar 2004-04-28 06:18:43 Re: Customised Encoding
Previous Message Ray Jackson 2004-04-28 04:12:34 date arithmetic over calender year boundaries