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

From Devrim Gündüz
Subject Re: Yum install fails to stop PostgreSQL on complete removal
Date
Msg-id 1403100287.14178.13.camel@asus-laptop-03.gunduz.org
Whole thread Raw
In response to Yum install fails to stop PostgreSQL on complete removal  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Yum install fails to stop PostgreSQL on complete removal
List pgsql-pkg-yum
Hi,

On Wed, 2014-06-18 at 12:37 +0800, Craig Ringer wrote:

> 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 think we do?

%preun server
if [ $1 = 0 ] ; then
        /sbin/service postgresql-%{majorversion} condstop >/dev/null 2>&1
        chkconfig --del postgresql-%{majorversion}
fi


> 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.

We do restart it.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment

pgsql-pkg-yum by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Docs and examples deleted from package
Next
From: Craig Ringer
Date:
Subject: Re: Libevent conflict on EL-6?