Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.
Дата
Msg-id CA+Tgmoap+LCpdv4avkcU3XPyLYFGNnju9XarwTeShzBztqyOHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Sat, Feb 12, 2022 at 6:26 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
> FWIW, here's a patch just adding a comment on how the startup process
> can get a free procState array slot even when SInvalShmemSize hasn't
> accounted for it.

I don't think the positioning of this code comment is very good,
because it's commenting on 0 lines of code. Perhaps that problem could
be fixed by making it the second paragraph of the immediately
preceding comment instead of a separate block, but I think the right
place to comment on this sort of thing is actually in the code that
sizes the data structure - i.e. SInvalShmemSize. If someone looks at
that function and says "hey, this uses GetMaxBackends(), that's off by
one!" they are not ever going to find this comment explaining the
reasoning.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: pg14 psql broke \d datname.nspname.relname
Следующее
От: Robert Haas
Дата:
Сообщение: Re: SSL/TLS instead of SSL in docs