Re: fix bgworkers in EXEC_BACKEND

Поиск
Список
Период
Сортировка
От anarazel@anarazel.de
Тема Re: fix bgworkers in EXEC_BACKEND
Дата
Msg-id 2e558203-cdd1-4bec-9cec-b50b9893e186@email.android.com
обсуждение исходный текст
Ответ на Re: fix bgworkers in EXEC_BACKEND  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

Tom Lane <tgl@sss.pgh.pa.us> schrieb:

>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.

BTW, I think it happens not to be broken in the non EXEC_BACKEND case because the registration point for bgworkers is
_PG_initwhich will only be called once without EXEC_BACKEND, so config changes to SIGHUP'able variables won't change a
thingdangerous as the bgworker stuff is all set up. 

Andres


---
Please excuse the brevity and formatting - I am writing this on my mobile phone.



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: fix bgworkers in EXEC_BACKEND
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Proposal: Store "timestamptz" of database creation on "pg_database"