Re: dynamic background workers, round two

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dynamic background workers, round two
Date: 2013-08-28 18:18:35
Message-ID: CA+TgmoY4Cf3m3sGNR9VxEXmm4AFjRNotL7Y3-WqHnk2rbNSb0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 28, 2013 at 2:04 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> Hm. Not this patches fault, but We seem to allow bgw_start_time ==
>> BgWorkerStart_PostmasterStart here which doesn't make sense...
>
> I can add a check for that. I agree that it's a separate patch.

On third thought, is there really any point to such a check? I mean,
no background worker is going to start before it's registered, and by
the time any background worker is registered, we'll be passed the time
indicated by all of those constants: BgWorkerStart_PostmasterStart,
BgWorkerStart_ConsistentState, BgWorkerStart_RecoveryFinished.

I think we should view that field as fixing the earliest time at which
the worker should be started, rather than the exact time at which it
must be started. Otherwise no value is sensible. And if we take that
approach, then for a dynamic background worker, any value is OK.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2013-08-28 18:30:41 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message Robert Haas 2013-08-28 18:15:35 Re: dynamic background workers, round two