X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3B1199DD4F4 for ; Tue, 6 Dec 2005 06:46:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82630-10 for ; Tue, 6 Dec 2005 06:46:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by postgresql.org (Postfix) with ESMTP id 8B7A99DD5EC for ; Tue, 6 Dec 2005 06:46:08 -0400 (AST) Received: from mx1.magproductions.nl (magtwo.magproductions.nl [217.114.101.51]) by svr2.postgresql.org (Postfix) with ESMTP id D91F5F0BEF for ; Tue, 6 Dec 2005 10:46:10 +0000 (GMT) Received: from cc756500-a.ensch1.ov.home.nl ([82.75.196.246] helo=[192.168.0.135]) by mx1.magproductions.nl with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1EjaKp-00056U-G2; Tue, 06 Dec 2005 11:46:11 +0100 Message-ID: <43956BDC.6070704@magproductions.nl> Date: Tue, 06 Dec 2005 11:45:48 +0100 From: Alban Hertroys User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051011) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jenny Cc: pgsql-general@postgresql.org Subject: Re: need help References: <20051206083838.90175.qmail@web31508.mail.mud.yahoo.com> In-Reply-To: <20051206083838.90175.qmail@web31508.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.332 required=5 tests=[RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.332 X-Spam-Level: * X-Archive-Number: 200512/306 X-Sequence-Number: 87869 Jenny wrote: > I'm running PostgreSQL 8.0.3 on i686-pc-linux-gnu (Fedora Core 2). I've been > dealing with Psql for over than 2 years now, but I've never had this case > before. > Then I try to run the query from the psql shell. For example, the table has > obat_id : A, B, C, D. > db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='A'; > (.... nothing happens.. I press the Ctrl-C to stop it. This is what comes out > :) > Cancel request sent > ERROR: canceling query due to user request > > (If I try another obat_id) > db=# UPDATE s_apotik SET stock = 100 WHERE obat_id='B'; > (Less than a second, this is what comes out :) > UPDATE 1 It could well be another client has a lock on that record, for example by doing a SELECT FOR UPDATE w/o a NOWAIT. You can verify by querying pg_locks. IIRC you can also see what query caused the lock by joining against some other system table, but the details escape me atm (check the archives, I learned that by following this list). If it's indeed a locked record, the process causing the lock is listed. Either kill it or call it's owner back from his/her coffee break ;) I doubt it's anything serious. -- Alban Hertroys alban@magproductions.nl magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede //Showing your Vision to the World//