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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: sawada(dot)mshk(at)gmail(dot)com
Cc: andres(at)anarazel(dot)de, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Replication slot drop message is sent after pgstats shutdown.
Date: 2021-08-31 09:34:12
Message-ID: 20210831.183412.1336438027751876562.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Tue, 31 Aug 2021 17:14:45 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote in
> On Tue, Aug 31, 2021 at 2:34 PM Andres Freund <andres(at)anarazel(dot)de> 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 it?
> >
> > The latter.
>
> Makes sense.
>
> I've attached the patch that moves them to its own
> before_shmem_exit(). Unless I missed to register the callback it works
> the same as before except for where to release and clean up the slots.

Is there any reason we need to register the callback dynamically? It
seems to me what we need to do here is to call the functions at
before-shmem-exit.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-08-31 09:50:04 Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)
Previous Message Daniel Gustafsson 2021-08-31 09:30:19 Re: perlcritic: prohibit map and grep in void conext