Received: from mail.memeticsystems.com (flywheel.memeticsystems.com [64.85.80.85]) by postgresql.org (8.11.3/8.11.4) with SMTP id fBKHR4m68342 for ; Thu, 20 Dec 2001 12:27:04 -0500 (EST) (envelope-from peter@memeticsystems.com) Received: (qmail 28707 invoked from network); 20 Dec 2001 17:27:09 -0000 Received: from unknown (HELO PETER) (63.249.24.21) by flywheel.memeticsystems.com with SMTP; 20 Dec 2001 17:27:09 -0000 From: "Peter T. Brown" To: "'Tom Lane'" , "'Robert B. Easter'" Cc: Subject: Re: controlling process priority Date: Thu, 20 Dec 2001 09:27:08 -0800 Message-ID: <001501c1897b$8dc5ae90$7d00000a@PETER> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <8399.1008860972@sss.pgh.pa.us> X-Archive-Number: 200112/221 X-Sequence-Number: 6043 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" 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