Re: bg worker: patch 1 of 6 - permanent process - Mailing list pgsql-hackers

From Markus Wanner
Subject Re: bg worker: patch 1 of 6 - permanent process
Date
Msg-id 4C764E9B.5090305@bluegap.ch
Whole thread Raw
In response to Re: bg worker: patch 1 of 6 - permanent process  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
Itagaki-san,

On 08/26/2010 01:02 PM, Itagaki Takahiro wrote:
> OK, I see why you proposed coordinator hook (yeah, I call it hook :)
> rather than adding user-defined processes.

I see. If you call that a hook, I'm definitely not a hook-hater ;-)  at 
least not according to your definition.

> However, we have autovacuum worker processes in addition to normal backend
> processes. Does it show a fact that there are some jobs we cannot run in
> normal backends?

Hm.. understood. You can use VACUUM from a cron job. And that's the 
problem autovacuum solves. So in a way, that's just a convenience 
feature. You want the same for general purpose user defined background 
processing, right?

>   For example, normal backends cannot do anything in idle time, so a
> time-based polling job is difficult in backends. It might be ok to
> fork processes for each interval when the polling interval is long,
> but it is not effective for short interval cases.  I'd like to use
> such kind of process as an additional stats collector.

Did you follow the discussion I had with Dimitri, who was trying 
something similar, IIRC. See the bg worker - overview thread. There 
might be some interesting bits thinking into that direction.

Regards

Markus


pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: bg worker: patch 1 of 6 - permanent process
Next
From: Magnus Hagander
Date:
Subject: Re: Committers info for the git migration - URGENT!