Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7728C9FA3E9 for ; Sun, 11 Feb 2007 04:47:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 15377-01 for ; Sun, 11 Feb 2007 04:47:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id 8C9A79F95E3 for ; Sun, 11 Feb 2007 04:47:08 -0400 (AST) Received: from a-kretschmer.de (p54B3B2A1.dip0.t-ipconnect.de [84.179.178.161]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id l1B8l3Xw005268 for ; Sun, 11 Feb 2007 09:47:04 +0100 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1HGAMe-0006hG-LM for pgsql-general@postgresql.org; Sun, 11 Feb 2007 09:47:16 +0100 Date: Sun, 11 Feb 2007 09:47:16 +0100 From: Andreas Kretschmer To: pgsql-general@postgresql.org Subject: Re: [ADMIN] Priorities for users or queries? Message-ID: <20070211084716.GB6652@KanotixBox> References: <45CE69B5.40204@araisoft.com> <376dd1950702110031i40d41133n85c6010d3f81d903@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <376dd1950702110031i40d41133n85c6010d3f81d903@mail.gmail.com> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.144 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200702/506 X-Sequence-Number: 108996 Edwin Eyan Moragas schrieb: > On 2/11/07, Benjamin Arai wrote: > >Hi, > >Is there a way to give priorities to queries or users? Something > >similar to NICE in Linux. My goal is to give the updating (backend) > >application a very low priority and give the web application a high > >priority to avoid disturbing the user experience. > >Thanks in advance! > > with all due respect to Josh who has replied to this question already. Just an idea: You can retrieve the PID and the username of running querys in pg_stat_activity. Perhaps, with this knowledge and an untrusted language you can run system-commands such renice to change the priority of running postmaster-processes. Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknow) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°