X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 54FCF9DCC0B for ; Thu, 15 Dec 2005 10:59:03 -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 18878-04 for ; Thu, 15 Dec 2005 10:59:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id 10CD49DCC05 for ; Thu, 15 Dec 2005 10:59:00 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 83D6735AC7; Thu, 15 Dec 2005 06:59:05 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 80B6935AC3; Thu, 15 Dec 2005 06:59:05 -0800 (PST) Date: Thu, 15 Dec 2005 06:59:05 -0800 (PST) From: Stephan Szabo To: Szabolcs BALLA Cc: pgsql-admin@postgresql.org Subject: Re: single click, double query In-Reply-To: <43A15F0B.6080306@confinsystems.com> Message-ID: <20051215065531.U65929@megazone.bigpanda.com> References: <43A15F0B.6080306@confinsystems.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[AWL=0.000] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/151 X-Sequence-Number: 19871 On Thu, 15 Dec 2005, Szabolcs BALLA wrote: > Hi, > > I have a strange problem with psql 7.4.7. > I have customers who run xp, with sp1 (with sp2 no problem), when they > report from our web-based application they send a query > after a single click. The same queries have been posted twice within a > few milliseconds. > How can I forbid this on db server side? Is it possible? Not easily that I can think of. Something between the two that passes connections but filters queries might be reasonably easy to make. I see two possible problems with this on the server side though. First, if those are coming in separate connections then you have to either delay for the first query or pay the cost of making a database backend even if you're going to drop it if its a duplicate. Second, if it's possible for two client instances to send the same query then you could break the application in the other direction where the second client gets no response.