Re: pg_background (and more parallelism infrastructure patches) - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: pg_background (and more parallelism infrastructure patches)
Date
Msg-id 5411F793.4000707@2ndquadrant.com
Whole thread Raw
In response to Re: pg_background (and more parallelism infrastructure patches)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_background (and more parallelism infrastructure patches)  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On 11/09/14 20:37, Robert Haas wrote:
>> 1. This patch generates warning on windows
>> 1>pg_background.obj : error LNK2001: unresolved external symbol
>> StatementTimeout
>>
>> You need to add PGDLLIMPORT for StatementTimeout
>
> OK.  I still think we should go back and PGDLLIMPORT-ize all the GUC variables.

+1

>> 4.
>> Won't it be better if pg_background_worker_main() can look more
>> like PostgresMain() (in terms of handling different kind of messages),
>> so that it can be extended in future to handle parallel worker.
>
> I don't think that a parallel worker will look like pg_background in
> much more than broad outline.  Some of the same constructs will get
> reused, but overall I think it's a different problem that I'd rather
> not conflate with this patch.

Yeah I agree here. While the patch provides a lot of necessary plumbing 
that any kind of parallel processing needs, the pg_background itself 
does not seem to be base for that.
Actually, when I first seen the pg_background, I was thinking that it 
looks like a good base for some kind of background job scheduling 
mechanism that was requested few times over the years (the actual 
scheduling is the only part missing now IMHO but that's separate 
discussion).

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Commitfest status
Next
From: Andres Freund
Date:
Subject: Re: pg_background (and more parallelism infrastructure patches)