Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A43529FB460 for ; Fri, 20 Jul 2007 15:55:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 67815-03 for ; Fri, 20 Jul 2007 15:54:58 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.229]) by postgresql.org (Postfix) with ESMTP id 2E6A69FB45E for ; Fri, 20 Jul 2007 15:55:00 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id l8so772152nzf for ; Fri, 20 Jul 2007 11:54:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PMt7zRZb5jhtkK4v7skKLaxDRyRZJzITCIyrwkwP/BI96rbZ7hCVgmDv5/xmObKzEkEJJhiB629B9luHNr9AwrS0D3LCUDkWIVEbEWbgqtuBwItySiGWy2pb5kqHOF0KRC/rmfe+Zc1nnGsVcJWdpirAcc8xfRjnZauQKTU+Qy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RVWZ6vfrOvnyyM2nYhxKRe4jjnoN4ah3VIm0gLreg79jYIVGECfUJAX13qiIVjGRzrSnXe4FHdhrCETqL3Xjz9oTSDdp/Wqa5gzilFbjl8IE23m97XiCerwqTAouJ4TfHEWQ4jroZ2QtIoMUGImgPZv49Ajh/aVhiT+K9F6pcXY= Received: by 10.114.146.1 with SMTP id t1mr754498wad.1184957695909; Fri, 20 Jul 2007 11:54:55 -0700 (PDT) Received: by 10.114.111.12 with HTTP; Fri, 20 Jul 2007 11:54:55 -0700 (PDT) Message-ID: Date: Fri, 20 Jul 2007 14:54:55 -0400 From: "Sibte Abbas" To: "Mark Steben" Subject: Re: row level locking Cc: pgsql-admin@postgresql.org In-Reply-To: <009c01c7cafa$874c2e60$b501a8c0@D1RPQZB1> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <009c01c7cafa$874c2e60$b501a8c0@D1RPQZB1> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/233 X-Sequence-Number: 26214 On 7/20/07, Mark Steben wrote: > > Hi listers, > > I have a table that is accessed by only one transaction. It has 1500 rows > each time that it processes > > This transaction. As soon as this transaction ends, it waits 10 seconds and > starts again. > > It has another maximum 1500 rows loaded. . > > > > My question is this: I believe a RowExclusive level lock is acquired 1500 > times during each transaction. What type operations does the transaction performs on the table? An exclusive row level lock is acquired only: i) when a row is being updated, deleted or marked for deletion (Implicit lock) ii) when SELECT FOR UPDATE query is executed on the table (to acquire a share lock you can use SELECT FOR SHARE) (Explicit lock) > > Is this true? Is there a way to disable RowExclusive locks and reduce > overhead since only this transaction Consider running postgresql in single user mode. This would eradicate all the Interprocess communication overheads. > > Accesses this table. I know there are ways to specify locking levels in > other DBMSs. To page or table levels. > Postgresql handles page level locks implicitly, users do not have any control over them. regards, -- Sibte Abbas EnterpriseDB http://www.enterprisedb.com