shmem_startup_hook called twice on Windows

Поиск
Список
Период
Сортировка
От Sami Imseih
Тема shmem_startup_hook called twice on Windows
Дата
Msg-id CAA5RZ0vEGT1eigGbVt604LkXP6mUPMwPMxQoRCbFny44w+9EUQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: shmem_startup_hook called twice on Windows
Список pgsql-hackers
Hi,

While working on a related area, I noticed that shmem_startup_hook
is called twice under EXEC_BACKEND.

The first call occurs in CreateSharedMemoryAndSemaphores() during
postmaster startup (!IsUnderPostmaster), which is expected.

The second call happens in AttachSharedMemoryStructs() (when
EXEC_BACKEND is defined), and this occurs in normal backends
(IsUnderPostmaster).

The second call does not seem correct. The startup hook that should
only run during
postmaster initialization, AFAIK.

Blame shows that this change was introduced in commit 69d903367c,
but I could not determine the rationale from the discussion,
so it may have been an oversight.

Thoughts?

--
Sami Imseih
Amazon Web Services (AWS)



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