Re: make MaxBackends available in _PG_init

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: make MaxBackends available in _PG_init
Дата
Msg-id YfHtpO9+pxsHblmX@paquier.xyz
обсуждение исходный текст
Ответ на Re: make MaxBackends available in _PG_init  ("Bossart, Nathan" <bossartn@amazon.com>)
Ответы Re: make MaxBackends available in _PG_init  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Tue, Jan 25, 2022 at 07:30:33PM +0000, Bossart, Nathan wrote:
> I think the patch is in decent shape.  There may be a few remaining
> places where GetMaxBackends() is called repeatedly in the same
> function, but IIRC v4 already clears up the obvious ones.  I don't
> know if this is worth worrying about too much, but I can create a new
> version if you think it is important.

There are such cases in FindLockCycleRecurse(), GetLockConflicts(),
GetLockStatusData() and InitProcGlobal(), as far as I can see.

Hmm.  I have been looking at this patch, and the lack of centralized
solution that could be used for other GUCs worries me like Fujii-san,
even if this would prevent an incorrect use of MaxBackends in contexts
where it should not be used because it is not initialized yet.  I
don't think it is a good idea in the long-term to apply this as-is.
--
Michael

Вложения

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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: Support for NSS as a libpq TLS backend
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work