Re: pg_background (and more parallelism infrastructure patches)

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_background (and more parallelism infrastructure patches)
Date: 2014-09-11 19:27:15
Message-ID: 5411F793.4000707@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-09-11 19:36:50 Re: pg_background (and more parallelism infrastructure patches)
Previous Message Petr Jelinek 2014-09-11 19:14:41 Re: Commitfest status