Search Postgresql Archives

Re: Priorities for users or queries?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Magnus,

Think this can be avoided as long the the queries executed on the lower priority process never lock anything important. In my case, I would alway be doing inserts with the lower priority process, so inversion should never occur. On the other hand if some lock occur somewhere else specific to Postgres then there may be an issue. Are there any other tables locked by the the Postgres process other than those locks explicitly set by the query?

Benjamin

Magnus Hagander wrote:
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@xxxxxxxxxxxxxx
[mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Benjamin Arai
Sent: Saturday, February 10, 2007 6:56 PM
To: pgsql-general@xxxxxxxxxxxxxx; pgsql-admin@xxxxxxxxxxxxxx
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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux