Re: pgsql: Add hooks for session start and session end, take two

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pgsql: Add hooks for session start and session end, take two
Дата
Msg-id CAHGQGwHtm1wyHjSBDUv7b18XXk=Kj1gB9pjTpak0duPJbAyG7w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Add hooks for session start and session end, take two  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Add hooks for session start and session end, take two
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Add hooks for session start and session end, take two