Mac OS X Shutdown Scripts? (was Re: Humor me: Postgresql vs. MySql (esp. licensing)) - Mailing list pgsql-general

From Alex Satrapa
Subject Mac OS X Shutdown Scripts? (was Re: Humor me: Postgresql vs. MySql (esp. licensing))
Date
Msg-id 3FC132B7.7090608@lintelsys.com.au
Whole thread Raw
In response to Re: Humor me: Postgresql vs. MySql (esp. licensing)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
>>Not always. More than once I have had a postgresql connection hung up
>>that will stop the main postmaster from dying on TERM. However the
>>machine will eventually kill it hard and thus could produce during restart.
>
>
> Seems fine to me.  Otherwise such a hangup could prevent system shutdown
> indefinitely, which is a Bad Thing when your UPS batteries have thirty
> seconds left in 'em ...

The thing that bothers me is that the OS will 'KILL' instead of 'TERM'
when applications haven't gone away fast enough.  If it takes PostgreSQL
21 seconds to finish shutting down cleanly, it's taken too long.

Using a shutdown script, most OSes will wait for the script to terminate
before going into TERM/wait/KILL mode.

I've been told that apparently Mac OS X does support shutdown scripts,
so I'll experiment a little with them over the next day or so, and
respond to this message once I've got some conclusive evidence either way.


pgsql-general by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Two rules on a view do not like each other :-(
Next
From: Alex Satrapa
Date:
Subject: Re: Open source data modeling tools for PostgreSQL