pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter T. Brown <peter@memeticsystems.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
To: 'Robert B. Easter' <reaster@comptechnews.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: controlling process priority
Date: Thu, 20 Dec 2001 09:27:08 -0800
Message-ID: <001501c1897b$8dc5ae90$7d00000a@PETER> (raw)
In-Reply-To: <8399.1008860972@sss.pgh.pa.us>

I had an idea last night that addresses the process priority and the locking
issue: use LIMIT with an offset in a long running thread to programmatically
throttle the backend processing.

This works only because I am storing all the results to my queries as
pointers in a temporary table (then using those values as the basis for
subsequent queries).



-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, December 20, 2001 7:10 AM
To: Robert B. Easter
Cc: Peter T. Brown; pgsql-sql@postgresql.org
Subject: Re: [SQL] controlling process priority


"Robert B. Easter" <reaster@comptechnews.com> writes:
> [ C function to nice down the backend ]

This sort of thing has been suggested before, but I've always wondered
whether it isn't counterproductive.  The trouble is priority inversion:
any time the niced backend is holding a lock on some shared
datastructure, it will be blocking the allegedly-higher-priority other
backends.

			regards, tom lane




view thread (4+ messages)

Message-ID: <001501c1897b$8dc5ae90$7d00000a@PETER>
Permalink:  ../001501c1897b$8dc5ae90$7d00000a@PETER/
Also on:    postgresql.org/message-id/001501c1897b$8dc5ae90$7d00000a@PETER

 · 

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-sql@postgresql.org
  Cc: peter@memeticsystems.com, tgl@sss.pgh.pa.us, reaster@comptechnews.com
  Subject: Re: controlling process priority
  In-Reply-To: <001501c1897b$8dc5ae90$7d00000a@PETER>

* 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