Re: Drop replslot after pgstat_shutdown cause assert coredump

2021-10-21 Thread Kyotaro Horiguchi
At Fri, 22 Oct 2021 11:43:08 +0900 (JST), Kyotaro Horiguchi wrote in > (Honestly, I haven't been able to reproduce the issue itself for > myself yet..) I managed to reproduce it for me. psql "dbname=postgres replication=database" postgres=# CREATE_REPLICATION_SLOT "ts1" TEMPORARY LOGICAL "pgo

Re: Drop replslot after pgstat_shutdown cause assert coredump

2021-10-21 Thread Kyotaro Horiguchi
I said: > 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

Re: Drop replslot after pgstat_shutdown cause assert coredump

2021-10-21 Thread Kyotaro Horiguchi
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 Pro

Re: Drop replslot after pgstat_shutdown cause assert coredump

2021-10-21 Thread Fujii Masao
On 2021/10/11 22:15, Greg Nancarrow wrote: On Mon, Oct 11, 2021 at 6:55 PM houzj.f...@fujitsu.com wrote: I can see the walsender tried to release a not-quite-ready repliaction slot that was created when create a subscription. But the pgstat has been shutdown before invoking ReplicationSlotR

Re: Drop replslot after pgstat_shutdown cause assert coredump

2021-10-11 Thread Greg Nancarrow
On Mon, Oct 11, 2021 at 6:55 PM houzj.f...@fujitsu.com wrote: > > I can see the walsender tried to release a not-quite-ready repliaction slot > that was created when create a subscription. But the pgstat has been shutdown > before invoking ReplicationSlotRelease(). > > The stack is as follows: > >

Drop replslot after pgstat_shutdown cause assert coredump

2021-10-11 Thread houzj.f...@fujitsu.com
Hi, When testing logical replication, I found a case which caused assert coredump on latest HEAD. The reproduction steps are as follows: 1) publisher create table test(i int); create publication pub for table test; begin; insert into test values(1); 2) subscriber create table te