Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: A WalSnd issue related to state WALSNDSTATE_STOPPING
Дата
Msg-id 20181121070941.GG1951@paquier.xyz
обсуждение исходный текст
Ответ на A WalSnd issue related to state WALSNDSTATE_STOPPING  (Paul Guo <pguo@pivotal.io>)
Ответы Re: A WalSnd issue related to state WALSNDSTATE_STOPPING  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Nov 21, 2018 at 12:54:30PM +0800, Paul Guo wrote:
> The panic reason is that since there is just one wal sender and
> WalSndCtl->walsnds[0].state is WALSNDSTATE_STOPPING so syncWalSnd will be
> NULL and that causes assert failure. Latest postgresql code removes the
> Assert code but the related similar code logic was kept. It looks like that
> we need to modify the logic similar like below (PG 9.4 STABLE) to allow
> WALSNDSTATE_STOPPING which is reasonable here If I understand correctly.

The checkpointer initializes a shutdown checkpoint where it tells to all
the WAL senders to stop once all the children processes are gone, so it
seems to me that there is little point in processing
SyncRepReleaseWaiters() when a WAL sender is in WALSNDSTATE_STOPPING
state as at this stage syncrep makes little sense.  It is still
necessary to process standby messages at this stage so as the primary
can shut down when it is sure that all the standbys have flushed the
shutdown checkpoint record of the primary.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Continue work on changes to recovery.conf API
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: incorrect xlog.c coverage report