Re: [ADMIN] Priorities for users or queries?

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [ADMIN] Priorities for users or queries?
Date: 2007-02-11 08:47:16
Message-ID: 20070211084716.GB6652@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-hackers

Edwin Eyan Moragas <haaktu(at)gmail(dot)com> schrieb:

> On 2/11/07, Benjamin Arai <benjamin(at)araisoft(dot)com> 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°

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Magnus Hagander 2007-02-11 09:34:51 Re: Priorities for users or queries?
Previous Message Benjamin Arai 2007-02-11 08:34:51 Re: Priorities for users or queries?

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-02-11 09:34:51 Re: Priorities for users or queries?
Previous Message Benjamin Arai 2007-02-11 08:34:51 Re: Priorities for users or queries?

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-02-11 09:34:51 Re: Priorities for users or queries?
Previous Message Peter Eisentraut 2007-02-11 08:35:41 Re: [COMMITTERS] pgsql: StrNCpy -> strlcpy (not complete)