X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 026D09FB390 for ; Thu, 24 Aug 2006 18:19:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 52865-04 for ; Thu, 24 Aug 2006 18:19:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 152499FB384 for ; Thu, 24 Aug 2006 18:19:42 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Thu, 24 Aug 2006 21:19:41 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 24 Aug 2006 16:19:41 -0500 Subject: Re: RES: Lock Problem From: Scott Marlowe To: =?ISO-8859-1?Q?Andr=E9_Jos=E9?= Guergolet Cc: Andrew Sullivan , pgsql-sql@postgresql.org In-Reply-To: <3FFA1818C1550246933DEA311C39B07612304A@CGEXC03.compugraf.com.br> References: <3FFA1818C1550246933DEA311C39B07612304A@CGEXC03.compugraf.com.br> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <1156454380.7223.91.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 24 Aug 2006 16:19:41 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.081 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200608/190 X-Sequence-Number: 26148 On Thu, 2006-08-24 at 16:12, Andr=C3=A9 Jos=C3=A9 Guergolet wrote: > Sorry, I have a table with 360 rows, in this table I control the state of= machines on network: >=20 >=20 > Ip State StateDate > 172.20.0.39 Running 2006-08-23 00:00:00 > 172.20.0.59 Running 2006-08-23 00:00:00 > 172.20.0.72 Running 2006-08-23 00:00:00 > 172.20.0.84 Running 2006-08-23 00:00:00 > 172.20.0.35 Running 2006-08-23 00:00:00 > 172.20.0.17 Running 2006-08-23 00:00:00 > 172.20.0.28 Running 2006-08-23 00:00:00 > 172.20.0.39 Running 2006-08-23 00:00:00 > 172.20.0.14 Running 2006-08-23 00:00:00 > 172.20.0.33 Running 2006-08-23 00:00:00 > 172.20.0.19 Running 2006-08-23 00:00:00 >=20 > My system, checks if my script is running in each machine at this table, = this table has 360 rows and has 50-100 updates per minute in columns STATE = and STATEDATE. >=20 > I list this states with a webpage. This webpage updates the list every 10= seconds. My page executes only "select * from machinestates". >=20 > If I stop the updates, I never get my page stopped at the select command. >=20 > I read about "DIRTY Transaction", is it the way? > I have another solution? I'm guessing you've got a different problem. Generally speaking, in an MVCC database like PostgreSQL, readers don't block writers, and writers don't block readers. We need more info on how you're doing this. SQL queries for the updates etc... Are you vacuuming the database often enough? Is this table suffering from bloat?