Re: fix bgworkers in EXEC_BACKEND

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: fix bgworkers in EXEC_BACKEND
Дата
Msg-id 20121227234850.GB31343@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: fix bgworkers in EXEC_BACKEND  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: fix bgworkers in EXEC_BACKEND
Список pgsql-hackers
On 2012-12-27 18:44:57 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > I am still worried about the following scenario in the EXEC_BACKEND case:
>
> > 1) postmaster starts
> > 2) reads config
> > 3) executes _PG_init for shared_preload_libraries
> > 4) library 'abc' gets config value 'abc.num_workers = 2' and registers as many workers
> > 5) some time goes by, workers, backends start
> > 6) abc.num_workers gets changed to 3, SIGHUP
>
> This is broken whether it's EXEC_BACKEND or not: you don't get to change
> anything that determines the number of workers post-startup.
> num_workers should have been declared PGC_POSTMASTER.

Well, the problem is, a shared library can't do that
afaics. abc.num_workers would be using custom_variable_classes (well,
whatever its called now, that it doesn't need to be configured).

There is no predefined 'num_workers' variable or anything like it in the
patch, but I guess some of the module authors will come of up with
configuration variables like that.

I personally want e.g. 'bdr.databases = 'a, b, c' which obviously has
the same problem...

Greetings,

Andres Freund

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fix bgworkers in EXEC_BACKEND
Следующее
От: "anarazel@anarazel.de"
Дата:
Сообщение: Re: fix bgworkers in EXEC_BACKEND