Re: shmem startup and shutdown hooks

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: shmem startup and shutdown hooks
Date: 2013-05-27 05:15:51
Message-ID: 20130527051550.GR15045@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit kapila wrote:
>
> On Saturday, May 25, 2013 12:50 AM Alvaro Herrera wrote:

> > It seems that the right place to do this is checkpointer shutdown, i.e.
> > when checkpointer is told to close shop it should also invoke various
> > modules' shutdown callbacks. There's no hook point there though, so
> > we'd need to introduce something new for this specific purpose.
>
> Do you mean to say that during shutdown of checkpoint, it should call
> interface which does same as shmem_exit() which means call shutdown
> callbacks of other modules?

I mean we should have some other hooking point for modules, one which is
guaranteed to be called only during shutdown. The current hook point in
use is shared memory reset, which does happen during shutdown; but also
happens when a process crashes and postmaster reinits the whole thing.

> Why would checkpointer shutdown is better place to handle?

Because it's the process whose termination defines when a system
shutdown takes place.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2013-05-27 05:42:35 Re: Processing long AND/OR lists
Previous Message Craig Ringer 2013-05-27 05:01:20 Re: Planning incompatibilities for Postgres 10.0