Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 7D4476315D5 for ; Thu, 10 Dec 2009 21:26:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70448-02 for ; Fri, 11 Dec 2009 01:26:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 1D3AD632F2B for ; Thu, 10 Dec 2009 21:26:22 -0400 (AST) Received: from 219-88-219-64.jetstream.xtra.co.nz ([219.88.219.64] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NIuGv-0007RL-4N; Fri, 11 Dec 2009 14:26:18 +1300 Message-ID: <4B219FAE.6070100@opencloud.com> Date: Fri, 11 Dec 2009 14:26:06 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: John R Pierce CC: pgsql-jdbc@postgresql.org Subject: Re: Connection.setReadOnly() References: <4B21737B.50009@hogranch.com> <4B219025.5070607@hogranch.com> In-Reply-To: <4B219025.5070607@hogranch.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/19 X-Sequence-Number: 20100 John R Pierce wrote: > we have a fairly large database thats fed a > constant stream of realtime data 24/7 from a factory doing both inserts > and updates... many different sorts of things have to query this > database, including mechanical/electrical engineering types doing adhoc > queries for oddball reports and such who are not SQL experts. its way > to easy for them to accidentally create a transaction that they never > end, causing multiday blockage of VACUUM, massive table bloat, etc. Presumably they could also run a query that accidentally consumes all the CPU and I/O bandwidth on your server (hello missing WHERE clause!) It sounds like what you need is an intermediate layer that enforces transaction and query timeouts, rather than giving your mech/eng types direct access to the DB. -O