Replying to myself: previous e-mail archived at
http://lists.debian.org/debian-user/2004/10/msg03246.html

Digging around, I've tracked down the messages about stopping postgresql to
/etc/init.d/postgresql, which is called by the prerm and preinst scripts. The
problem would seem to be that
    /etc/init.d/postgresql stop
will call
    start-stop-daemon --stop --verbose --exec ${POSTMASTER}
i.e. without specifying the signal to send. It therefore defaults to SIGTERM (man
 start-stop-daemon). When postmaster receives a SIGTERM it waits for all clients
to disconnect before quitting (man postmaster). The SIGQUIT I sent was overkill:
that causes it to quit without properly aborting any ongoing transactions.
SIGINT provides a half-way house, quitting immediately but safely.

Perhaps preinst and prerm should attempt to kill postmaster with a SIGTERM
(either using the init.d script or pg_ctl), pause, check whether it died, and if
it didn't prompt the user to determine whether to send a SIGINT or abort the
install / removal?

-----
Peter Taylor


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to