Re: Drop replslot after pgstat_shutdown cause assert coredump

Поиск
Список
Период
Сортировка
Искать
От
Kyotaro Horiguchi
Тема
Re: Drop replslot after pgstat_shutdown cause assert coredump
Дата
Msg-id
20211022.094543.325857524282670720.horikyota.ntt@gmail.com
Ответ на
Список
Дерево обсуждения
Drop replslot after pgstat_shutdown cause assert coredump "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Re: Drop replslot after pgstat_shutdown cause assert coredump Greg Nancarrow <gregn4422@gmail.com>
Re: Drop replslot after pgstat_shutdown cause assert coredump Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Drop replslot after pgstat_shutdown cause assert coredump Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Drop replslot after pgstat_shutdown cause assert coredump Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Drop replslot after pgstat_shutdown cause assert coredump Kyotaro Horiguchi <horikyota.ntt@gmail.com>
At Fri, 22 Oct 2021 02:10:21 +0900, Fujii Masao  wrote in 
> Even in prior to the commit, pgstat_shutdown_hook() can be called
> before ProcKill() at the backend exit, so ISTM that the problem can
> be reproduced.
> 
> Probably we need to make sure that pgstat_shutdown_hook() is called
> after ProcKill(), e.g., by registering pgstat_shutdown_hook() into

Considering the coming shared-memory based stats collector, pgstat
must be shutdown before shared memory shutdown.  Every operation that
requires stats collector also must be shut down before the pgstat
shutdown. A naive solution would be having before-pgstat-shutdown hook
but I'm not sure it's the right direction.

> on_proc_exit_list (I'm not sure if this change is safe, though).
> Or maybe pgstat logic for replication slot drop needs to be
> overhauled.

I think we don't want to lose the stats numbers of the to-be-dropped
slot. So the slot-drop must happen before pgstat shutdown.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления
От: Masahiro Ikeda
Дата:
От: Andres Freund
Дата:
FAQ