PGDATA in 9.3.5-1 upgrade on Centos 5.4

From: <rami(dot)annala(at)teliasonera(dot)com>
To: <pgsql-pkg-yum(at)postgresql(dot)org>
Subject: PGDATA in 9.3.5-1 upgrade on Centos 5.4
Date: 2014-11-04 13:39:08
Message-ID: 5059FCA4264C004B9F2B1D7909EE1BF813BF1ECD@EXMB12TSTRZ2.tcad.telia.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum


Hi,

I have a quick question about upgrading postgresql-server rpm from 9.3.4-1PGDG.rhel5 to 9.3.5-1PGDG.rhel5 on Centos 5.4.

As highlighted below, the 9.3.5 rpm seems to overwrite PGDATA variable at ~postgres/.bash_profile. We have our database at a different location and this breaks a lot of scripts and admins.
Is PGDATA from now on fixed at /var/lib/pgsql/version/data or is this maybe a bug slipped into this particular rpm? If the rpm is fine, how should we run the DB in a non-default directory?

cheers,
Rami Annala
Alava.fi

[server ~]$ rpm -q --scripts -p postgresql93-server-9.3.5-1PGDG.rhel5.i386.rpm
warning: postgresql93-server-9.3.5-1PGDG.rhel5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 442df0f8
preinstall scriptlet (using /bin/sh):
groupadd -g 26 -o -r postgres >/dev/null 2>&1 || :
useradd -M -n -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \
-c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || :
touch /var/log/pgsql
chown postgres:postgres /var/log/pgsql
chmod 0700 /var/log/pgsql
postinstall scriptlet (using /bin/sh):
chkconfig --add postgresql-9.3
/sbin/ldconfig
# postgres' .bash_profile.
# We now don't install .bash_profile as we used to in pre 9.0. Instead, use cat,
# so that package manager will be happy during upgrade to new major version.
echo "[ -f /etc/profile ] && source /etc/profile
PGDATA=/var/lib/pgsql/9.3/data
export PGDATA" > /var/lib/pgsql/.bash_profile
chown postgres: /var/lib/pgsql/.bash_profile
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ] ; then
/sbin/service postgresql-9.3 condstop >/dev/null 2>&1
chkconfig --del postgresql-9.3
fi
postuninstall scriptlet (using /bin/sh):
/sbin/ldconfig
if [ $1 -ge 1 ]; then
/sbin/service postgresql-9.3 condrestart >/dev/null 2>&1
fi

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Devrim Gündüz 2014-11-11 08:38:12 Re: CentOS 7 Packages for 9.1
Previous Message Jewell, Chris 2014-11-03 01:11:58 Linking gdal against a libgeotiff based on libtiff4