Re: pgsql: Add hooks for session start and session end, take two - Mailing list pgsql-committers

From Fujii Masao
Subject Re: pgsql: Add hooks for session start and session end, take two
Date
Msg-id CAHGQGwHtm1wyHjSBDUv7b18XXk=Kj1gB9pjTpak0duPJbAyG7w@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add hooks for session start and session end, take two  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-committers
On Wed, Oct 2, 2019 at 10:08 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> On 2019-Oct-02, Michael Paquier wrote:
>
> > On Wed, Oct 02, 2019 at 01:27:50PM +0900, Fujii Masao wrote:
> > > If only session end hook is problematic, you will commit session start
> > > hook again?
> >
> > Sure, it would be possible to cut the apple in half here.  Now my
> > understanding was that both hooks were a set.  What do people think?
>
> I think that having just session start is still useful

+1

Regarding session end hook, you can do the almost same thing as that hook
by calling on_shmem_exit(), before_shmem_exit() or on_proc_exit() in
other hook like session start hook. This approach also has the same issue
discussed upthread, though. Anyway, I'm not sure if session end hook is
"actually" necessary.

Regards,

-- 
Fujii Masao



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Add hooks for session start and session end, take two
Next
From: Andres Freund
Date:
Subject: Re: pgsql: Add hooks for session start and session end, take two