X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 61C8AD1B4E7 for ; Wed, 28 Apr 2004 01:16:33 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 57115-09 for ; Wed, 28 Apr 2004 01:16:32 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 45FA9D1B4DF for ; Wed, 28 Apr 2004 01:16:31 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3S4GTRV022919; Wed, 28 Apr 2004 00:16:29 -0400 (EDT) To: "Denis Khabas" Cc: pgsql-sql@postgresql.org Subject: Re: Which SQL command creates ExclusiveLock? In-reply-to: <5DEC3FFCDE2F7C4DA45433EE09A4F22C013457FF@colossus.dyadem.corp> References: <5DEC3FFCDE2F7C4DA45433EE09A4F22C013457FF@colossus.dyadem.corp> Comments: In-reply-to "Denis Khabas" message dated "Wed, 21 Apr 2004 10:58:28 -0400" Date: Wed, 28 Apr 2004 00:16:28 -0400 Message-ID: <22918.1083125788@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200404/308 X-Sequence-Number: 17683 "Denis Khabas" 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