X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 998F6D1BCB8 for ; Fri, 16 Apr 2004 18:12:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 80086-09 for ; Fri, 16 Apr 2004 18:12:48 -0300 (ADT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5C486D1B8B7 for ; Fri, 16 Apr 2004 18:12:50 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i3GLCqUM002851; Fri, 16 Apr 2004 17:12:52 -0400 (EDT) To: Chris Kratz Cc: pgsql-performance@postgresql.org Subject: Re: Long running queries degrade performance In-reply-to: <200404161128.00851.chris.kratz@vistashare.com> References: <200404161128.00851.chris.kratz@vistashare.com> Comments: In-reply-to Chris Kratz message dated "Fri, 16 Apr 2004 11:28:00 -0400" Date: Fri, 16 Apr 2004 17:12:52 -0400 Message-ID: <2850.1082149972@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/227 X-Sequence-Number: 6527 Chris Kratz writes: > ... Or if worse comes to worse to actually kill long running > processes without taking down the whole db as we have had to do on occasion. A quick "kill -INT" suffices to issue a query cancel, which I think is what you want here. You could also consider putting an upper limit on how long things can run by means of statement_timeout. Those are just band-aids though. Not sure about the underlying problem. Ordinarily I'd guess that the big-hog queries are causing trouble by evicting everything the other queries need from cache. But since your database fits in RAM, that doesn't seem to hold water. What PG version are you running? regards, tom lane