Yum install fails to stop PostgreSQL on complete removal - Mailing list pgsql-pkg-yum

From Craig Ringer
Subject Yum install fails to stop PostgreSQL on complete removal
Date
Msg-id 53A11784.5080107@2ndquadrant.com
Whole thread Raw
Responses Re: Yum install fails to stop PostgreSQL on complete removal  (Devrim Gündüz <devrim@gunduz.org>)
List pgsql-pkg-yum
Hi

It looks like the PGDG RPMs for PostgreSQL don't stop the server in the
prerm script even when the package is being fully uninstalled, not just
replaced.

I'd like to add a prerm script that tests the prerm script argument to
see whether it's 0 (package being uninstalled) and if so, stops
PostgreSQL. Objections? This will *not* stop or restart PostgreSQL when
the package is just updated.

Separately, I'd like to _restart_ PostgreSQL in a %post script if it's
already running and we updated the package. PostgreSQL shouldn't really
be running w/o a restart after a minor version update.

Comments?

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-pkg-yum by date:

Previous
From: Craig Ringer
Date:
Subject: bash profile for 9.3, 9.4 are wrong
Next
From: Craig Ringer
Date:
Subject: Docs and examples deleted from package