pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: Adam Rich <adam.r@sbcglobal.net>
Cc: Benjamin Arai <benjamin@araisoft.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Priorities for users or queries?
Date: Sun, 11 Feb 2007 10:34:51 +0100
Message-ID: <45CEE33B.8020303@hagander.net> (raw)
In-Reply-To: <000001c74da2$a9a4a990$6400a8c0@dualcore>
References: <000001c74da2$a9a4a990$6400a8c0@dualcore>

Most likely, you do not want to do this. You *can* do it, but you are
quite likely to suffer from priority inversion
(http://en.wikipedia.org/wiki/Priority_inversion)

//Magnus


Adam Rich wrote:
> There is a function pg_backend_pid() that will return the PID for
> the current session.  You could call this from your updating app
> to get a pid to feed to the NICE command.
> 
> 
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Benjamin Arai
> Sent: Saturday, February 10, 2007 6:56 PM
> To: pgsql-general@postgresql.org; pgsql-admin@postgresql.org
> Subject: [GENERAL] Priorities for users or queries?
> 
> 
> 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!
> 
> Benjamin
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org/
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq




view thread (30+ messages)  latest in thread

Message-ID: <45CEE33B.8020303@hagander.net>
Permalink:  ../45CEE33B.8020303@hagander.net/
Also on:    postgresql.org/message-id/45CEE33B.8020303@hagander.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: magnus@hagander.net, adam.r@sbcglobal.net, benjamin@araisoft.com, pgsql-general@postgresql.org
  Subject: Re: Priorities for users or queries?
  In-Reply-To: <45CEE33B.8020303@hagander.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox