X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1DFCFD1EAE7 for ; Thu, 6 May 2004 12:41:16 -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 26583-03 for ; Thu, 6 May 2004 12:40:54 -0300 (ADT) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 1A60BD1B58E for ; Thu, 6 May 2004 12:40:54 -0300 (ADT) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i46FecN6008771; Thu, 6 May 2004 09:40:38 -0600 (MDT) Date: Thu, 6 May 2004 09:40:53 -0600 (MDT) From: "scott.marlowe" To: Gaetano Mendola Cc: Tom Lane , Chris Gamache , Subject: Re: Postmaster hogs CPU In-Reply-To: <40999B90.5080004@bigfoot.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-IHS-MailScanner-Envelope-Sender: scott.marlowe@ihs.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/59 X-Sequence-Number: 13375 On Thu, 6 May 2004, Gaetano Mendola wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Tom Lane wrote: > > | Gaetano Mendola writes: > | > |>You can basically renice the process that is performing the query. > | > | > | However, that's unlikely to do anything very pleasant, since you'll have > | priority-inversion problems. "nice" has no idea when the process is > | holding a lock that someone else wants ... > > That can be true, however in order to have a priority-inversion problem > I think are necessary 3 different level of priority, you have carefully > choose the postmaster and good value of nice in order to have it happen. > > I was wandering about do the same work done with vacuum ( the sleep > trick each n records) in order to slow some expensive but not crucial > queries: > > test> set query_delay = 10; <-- 10 ms > test> select * from ; I like that idea. Make it more like a query_priority and let the system figure out delays though.