Re: pgsql: Implement pg_wal_replay_wait() stored procedure

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: pgsql: Implement pg_wal_replay_wait() stored procedure
Дата
Msg-id CAApHDvpE3p3iiLy-H3jzBHmGn1V+KeeH=myO7+359qLjRF=Nzg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Implement pg_wal_replay_wait() stored procedure  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-committers
On Wed, 3 Apr 2024 at 09:42, Alexander Korotkov <aekorotkov@gmail.com> wrote:
> I'm trying to figure out if this failure could be related to this commit...
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=culicidae&dt=2024-04-02%2020%3A24%3A55

Yeah, I think it is.

The problem is that in WaitLSNSetLatches() waitLSN is NULL, so
SpinLockAcquire(&waitLSN->mutex); segfaults.  This shared memory
segment is initialized in WaitLSNShmemInit() called via
CreateSharedMemoryAndSemaphores().  If you look at main() in main.c
EXEC_BACKEND builds call SubPostmasterMain(), which has no call to
CreateSharedMemoryAndSemaphores(), so waitLSN isn't initialized.

David



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: pgsql: Implement pg_wal_replay_wait() stored procedure
Следующее
От: Alexander Korotkov
Дата:
Сообщение: pgsql: Move WaitLSNShmemInit() to CreateOrAttachShmemStructs()