Re: Replication slot drop message is sent after pgstats shutdown.

2022-03-18 Thread Noah Misch
On Fri, Mar 18, 2022 at 01:24:15PM -0700, Andres Freund wrote: > On 2022-03-18 00:28:37 -0700, Noah Misch wrote: > > === > > diff -U3 > > /export/home/nm/farm/studio64v12_6/HEAD/pgsql/contrib/test_decoding/expected/slot_creation_error.out > > > >

Re: Replication slot drop message is sent after pgstats shutdown.

2022-03-18 Thread Andres Freund
Hi, On 2022-03-18 00:28:37 -0700, Noah Misch wrote: > On Tue, Feb 15, 2022 at 08:58:56AM -0800, Andres Freund wrote: > > Pushed the test yesterday evening, after Tom checked if it is likely to be > > problematic. Seems to worked without problems so far. > > wrasse│ 2022-02-15 09:29:06 │

Re: Replication slot drop message is sent after pgstats shutdown.

2022-03-18 Thread Kyotaro Horiguchi
At Fri, 18 Mar 2022 00:28:37 -0700, Noah Misch wrote in > === > diff -U3 > /export/home/nm/farm/studio64v12_6/HEAD/pgsql/contrib/test_decoding/expected/slot_creation_error.out > >

Re: Replication slot drop message is sent after pgstats shutdown.

2022-03-18 Thread Noah Misch
On Tue, Feb 15, 2022 at 08:58:56AM -0800, Andres Freund wrote: > Pushed the test yesterday evening, after Tom checked if it is likely to be > problematic. Seems to worked without problems so far. wrasse│ 2022-02-15 09:29:06 │ HEAD │

Re: Replication slot drop message is sent after pgstats shutdown.

2022-02-15 Thread Andres Freund
Hi, On 2022-02-15 14:07:26 +0900, Masahiko Sawada wrote: > On Tue, Feb 15, 2022 at 12:09 PM Kyotaro Horiguchi > wrote: > > FWIW I agree to the proposed test on the direction. > > +1 Pushed the test yesterday evening, after Tom checked if it is likely to be problematic. Seems to worked without

Re: Replication slot drop message is sent after pgstats shutdown.

2022-02-14 Thread Masahiko Sawada
On Tue, Feb 15, 2022 at 12:09 PM Kyotaro Horiguchi wrote: > > At Mon, 14 Feb 2022 17:20:16 -0800, Andres Freund wrote > in > > Hi, > > > > On 2021-12-22 22:34:45 +0900, Masahiko Sawada wrote: > > > I've attached an updated patch. Please review it. > > > > Sorry for dropping the ball on this

Re: Replication slot drop message is sent after pgstats shutdown.

2022-02-14 Thread Kyotaro Horiguchi
At Mon, 14 Feb 2022 17:20:16 -0800, Andres Freund wrote in > Hi, > > On 2021-12-22 22:34:45 +0900, Masahiko Sawada wrote: > > I've attached an updated patch. Please review it. > > Sorry for dropping the ball on this again :(. I've pushed the fix with some > very minor polishing. Thanks! > >

Re: Replication slot drop message is sent after pgstats shutdown.

2022-02-14 Thread Andres Freund
Hi, On 2021-12-22 22:34:45 +0900, Masahiko Sawada wrote: > I've attached an updated patch. Please review it. Sorry for dropping the ball on this again :(. I've pushed the fix with some very minor polishing. > > The attached detects that bug, but I'm not sure it's worth expending > > test time,

Re: Replication slot drop message is sent after pgstats shutdown.

2021-12-22 Thread Masahiko Sawada
On Mon, Dec 13, 2021 at 12:11 PM Kyotaro Horiguchi wrote: > > At Fri, 10 Dec 2021 18:13:31 +0900, Masahiko Sawada > wrote in > > I agreed with Andres and Horiguchi-san and attached an updated patch. > > Thanks for the new version. > > It seems fine, but I have some comments from a cosmetic

Re: Replication slot drop message is sent after pgstats shutdown.

2021-12-12 Thread Kyotaro Horiguchi
At Fri, 10 Dec 2021 18:13:31 +0900, Masahiko Sawada wrote in > I agreed with Andres and Horiguchi-san and attached an updated patch. Thanks for the new version. It seems fine, but I have some comments from a cosmetic viewpoint. + /* +* Register callback to make sure cleanup and

Re: Replication slot drop message is sent after pgstats shutdown.

2021-12-10 Thread Masahiko Sawada
On Wed, Sep 1, 2021 at 12:37 PM Andres Freund wrote: > > Hi, > > On 2021-09-01 10:05:18 +0900, Masahiko Sawada wrote: > > On Wed, Sep 1, 2021 at 2:39 AM Andres Freund wrote: > > > On 2021-08-31 18:34:12 +0900, Kyotaro Horiguchi wrote: > > > > At Tue, 31 Aug 2021 17:14:45 +0900, Masahiko Sawada

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-31 Thread Andres Freund
Hi, On 2021-09-01 10:05:18 +0900, Masahiko Sawada wrote: > On Wed, Sep 1, 2021 at 2:39 AM Andres Freund wrote: > > On 2021-08-31 18:34:12 +0900, Kyotaro Horiguchi wrote: > > > At Tue, 31 Aug 2021 17:14:45 +0900, Masahiko Sawada > > > wrote in > > > > On Tue, Aug 31, 2021 at 2:34 PM Andres

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-31 Thread Masahiko Sawada
On Wed, Sep 1, 2021 at 2:39 AM Andres Freund wrote: > > Hi, > > On 2021-08-31 18:34:12 +0900, Kyotaro Horiguchi wrote: > > At Tue, 31 Aug 2021 17:14:45 +0900, Masahiko Sawada > > wrote in > > > On Tue, Aug 31, 2021 at 2:34 PM Andres Freund wrote: > > > > > > > > On 2021-08-31 14:22:39 +0900,

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-31 Thread Andres Freund
Hi, On 2021-08-31 18:34:12 +0900, Kyotaro Horiguchi wrote: > At Tue, 31 Aug 2021 17:14:45 +0900, Masahiko Sawada > wrote in > > On Tue, Aug 31, 2021 at 2:34 PM Andres Freund wrote: > > > > > > On 2021-08-31 14:22:39 +0900, Masahiko Sawada wrote: > > > > You mean to move only the part of

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-31 Thread Kyotaro Horiguchi
At Tue, 31 Aug 2021 17:14:45 +0900, Masahiko Sawada wrote in > On Tue, Aug 31, 2021 at 2:34 PM Andres Freund wrote: > > > > On 2021-08-31 14:22:39 +0900, Masahiko Sawada wrote: > > > You mean to move only the part of sending the message to its own > > > before_shmem_exit() callback? or move

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-31 Thread Masahiko Sawada
On Tue, Aug 31, 2021 at 2:34 PM Andres Freund wrote: > > On 2021-08-31 14:22:39 +0900, Masahiko Sawada wrote: > > You mean to move only the part of sending the message to its own > > before_shmem_exit() callback? or move ReplicationSlotRelease() and > > ReplicationSlotCleanup() from ProcKill() to

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-30 Thread Andres Freund
On 2021-08-31 14:22:39 +0900, Masahiko Sawada wrote: > You mean to move only the part of sending the message to its own > before_shmem_exit() callback? or move ReplicationSlotRelease() and > ReplicationSlotCleanup() from ProcKill() to it? The latter.

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-30 Thread Masahiko Sawada
On Tue, Aug 31, 2021 at 12:45 PM Andres Freund wrote: > > Hi, > > On 2021-08-31 11:37:08 +0900, Masahiko Sawada wrote: > > At step #2, wal sender waits for another transaction started at step > > #1 to complete after creating the replication slot. When the server is > > stopping, wal sender

Re: Replication slot drop message is sent after pgstats shutdown.

2021-08-30 Thread Andres Freund
Hi, On 2021-08-31 11:37:08 +0900, Masahiko Sawada wrote: > At step #2, wal sender waits for another transaction started at step > #1 to complete after creating the replication slot. When the server is > stopping, wal sender process drops the slot on releasing the slot > since it's still

Replication slot drop message is sent after pgstats shutdown.

2021-08-30 Thread Masahiko Sawada
Hi all, I found another pass where we report stats after the stats collector shutdown. The reproducer and the backtrace I got are here: 1. psql -c "begin; create table a (a int); select pg_sleep(30); commit;" & 2. pg_recvlogical --create-slot -S slot -d postgres & 3. stop the server TRAP: