Product: TIBCO Spotfire®
Upgrade Alpine Chorus Internal PostgreSQL 9.2 DB to 9.3
Upgrade Alpine Chorus Internal PostgreSQL 9.2 DB to 9.3
Directory Structure and Path Variables:
Alpine Chorus PostgreSQL
/usr/local/chorus/current/postgres
Alpine Chrous PostgreSQL Binaries:
/usr/local/chorus/current/postgres/bin
Original 9.2 Binaries:
/usr/pgsql-9.2/
Original 9.3 Binaries:
/usr/pgsql-9.3/
Alpine Chorus PostgreSQL Data Directory DB (-> = softlink)
/usr/local/chorus/current/postgres-db -> /usr/local/chorus/shared/db -> /data/chorus/db
To manually connect to chorus database as postgres_chorus user.
$CHORUS_HOME/current/postgres/bin/psql -U postgres_chorus -p 8543 chorus;
To Start PostgreSQL 9.3 manually (-D Data Directory, -l Log directory/file)
/usr/pgsql-9.3/bin/pg_ctl -D /data/chorus/db2 -l /tmp/db2server.log start
/usr/pgsql-9.3/bin/pg_ctl -D /data/chorus/db2 -l /tmp/db2server.log stop
Step-by-step guide
PostgreSQL 9.3 Installation
- install 9.3. Ensure you use this as your data directory /data/chorus/db2. Binary directory is most likely at this location: /usr/pgsql-9.3
- Initialze the 9.3 Database. Make sure to use postgres_chorus as the installing user (superuser).
/initdb -U postgres_chorus -D /data/chorus/db2 - Start Postgres9.3 database
./pg_ctl -l /tmp/server93.log -D /data/chorus/db2/ start - Connect to PostgreSQL 9.3 - There may only be 1 or 2 standard DB (postgres and template1). This will esure you can login to the db as postgres_chorus and connect to an existing db (template1)
./psql -U postgres_chorus template1 - Stop PostgreSQL 9.3 DB
./pg_ctl -D /data/chorus/db2 stop - Make Sure both PostgreSQL db have stopped before running this command
./pg_upgrade -v -b /usr/pgsql-9.2/bin/ -p 5432 -B /usr/pgsql-9.3/bin/ -d /data/chorus/db -D /data/chorus/db2 -u postgres_chorus - After Successful completion, start PostgreSQL 9.3
./pg_ctl -D /data/chorus/db2/ -l /tmp/93server.log start - Login as postgres_chorus and connect chorus db.
./psql -U postgres_chorus chorus - Stop PostgreSQL 9.3 db
./pg_ctl -D /data/chorus/db2/ -l /tmp/93server.log stop
- Remove old 9.2 binaries from $CHORUS_HOME
rm -rf /usr/local/chorus/current/postgres/* - Copy new 9.3 binaries from /usr/pgsql-9.3
cp -R /usr/pgsql-9.3/* /usr/local/chorus/current/postgres/ - Remove old 9.2 data directory
rm -rf /data/chorus/db/* - Copy new 9.3 data from /data/chorus/db2
mv /data/chorus/db2/* /data/chorus/db
rm -rf /data/chorus/db2 - Use chorus_control.sh start to start Alpine Chorus (and the new db)
chorus_constrol.sh start - Use chorus_psql.sh script to connect to db
/usr/local/chorus/chorus_psql.sh
?
Related articles
http://www.uptimemadeeasy.com/databases/upgrade-postgresql/
Comments
0 comments
Article is closed for comments.