Re: dynamic background workers, round two

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: dynamic background workers, round two
Дата
Msg-id CA+TgmoakmgbuZ_omgsHrHHvxxJTcr1Sq9kmGL0v5WR+vvg2aDA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: dynamic background workers, round two  (Andres Freund <andres@anarazel.de>)
Ответы Re: dynamic background workers, round two
Список pgsql-hackers
On Sun, Aug 11, 2013 at 1:31 AM, Andres Freund <andres@anarazel.de> wrote:
> So, I'd suggest something like:
>
> typedef enum BgwHandleStatus {
>    BGWH_SUCCESS, /* sucessfully got status */
>    BGWH_NOT_YET, /* worker hasn't started yet */
>    BGWH_GONE, /* worker had been started, but shut down already */
>    BGWH_POSTMASTER_DIED /* well, there you go */
> } BgwHandleStatus;
>
>
> BgwHandleStatus GetBackgroundWorkerPid(BackgroundWorkerHandle *handle, pid_t *pid);
> BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pid);

OK, here's a patch that API.  I renamed the constants a bit, because a
process that has stopped is not necessarily gone; it could be
configured for restart.  But we can say that it is stopped, at the
moment.

I'm not sure that this API is an improvement.  But I think it's OK, if
you prefer it.

...Robert

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: StrategyGetBuffer optimization, take 2
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Fix Windows socket error checking for MinGW