RE: Data migration from postgres 8.4 to 9.4

From: Akshay Ballarpure <akshay(dot)ballarpure(at)tcs(dot)com>
To: "Albin, Lloyd P" <lalbin(at)scharp(dot)org>, pgsql-performance(at)lists(dot)postgresql(dot)org, pgsql(at)lists(dot)postgresql(dot)org
Subject: RE: Data migration from postgres 8.4 to 9.4
Date: 2018-04-17 12:24:12
Message-ID: OFA1309B83.DA5F046B-ON65258272.00435FE8-65258272.0043F46A@tcs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

Thank you for detailed info. much appreciated. May i know how to install
pg_upgrade ?

With Best Regards
Akshay

From: "Albin, Lloyd P" <lalbin(at)scharp(dot)org>
To: Akshay Ballarpure <akshay(dot)ballarpure(at)tcs(dot)com>
Date: 04/16/2018 08:38 PM
Subject: RE: Data migration from postgres 8.4 to 9.4

Akshay ,

There are several Official ways to upgrade PostgreSQL.

1) Use pg_upgrade (Faster) Postgres 8.4 to Postgres 9.4. Use the Postgres
9.4 version of pg_upgrade.
https://www.postgresql.org/docs/9.4/static/pgupgrade.html

2) Dump and Restore your database into a new server (Slower) Postgres 8.4
to Postgres 9.4 Use pg_dump with pg_restore or pg_dumpall with psql from
Postgres 9.4 against your Postgres 8.4 Server. You need to use this method
if you wish to change your initdb settings, such as the default encoding,
turn on checksums, etc.
https://www.postgresql.org/docs/9.4/static/app-pgdump.html
https://www.postgresql.org/docs/9.4/static/app-pgrestore.html
https://www.postgresql.org/docs/9.4/static/app-pg-dumpall.html

3) Swap out the binaries. This can only be done using the same Postgres
version (8.4.x or 9.4.x or 10.x) This means that you can upgrade from
9.4.9 to 9.4.12 by just swapping out the binaries.

4) Unofficially you can use things like slony, etc to do a live migration
without downtime.

Lloyd

From: Akshay Ballarpure [akshay(dot)ballarpure(at)tcs(dot)com]
Sent: Monday, April 16, 2018 12:03 AM
Subject: Data migration from postgres 8.4 to 9.4

Hello,
I need help in using postgresql 8.4 data in postgres 9.4 version. Do I
need to run any tool to achieve the same?

Steps i followed is ran postgresql 8.4 and 9.4, copied data from 8.4
instance to 9.4 and try to start postgresql 9.4 but no luck, getting below
error.

[root(at)ms-esmon esm-data]# su - postgres -c
"/opt/rh/rh-postgresql94/root/usr/bin/postgres -D
/var/ericsson/esm-data/postgresql-data/ 2>&1 &"
[root(at)ms-esmon esm-data]# LOG: skipping missing configuration file
"/var/ericsson/esm-data/postgresql-data/postgresql.auto.conf"
2018-04-16 06:52:01.546 GMT FATAL: database files are incompatible with
server
2018-04-16 06:52:01.546 GMT DETAIL: The data directory was initialized
by PostgreSQL version 8.4, which is not compatible with this version
9.4.9.

With Best Regards
Akshay
Ericsson OSS MON
Tata Consultancy Services
Mailto: akshay(dot)ballarpure(at)tcs(dot)com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Consulting
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-04-17 13:20:12 Re: pg_dump to a remote server
Previous Message Thiemo Kellner 2018-04-17 11:23:18 Re: psql variable to plpgsql?

Browse pgsql-performance by date

  From Date Subject
Next Message Hackety Man 2018-04-17 14:01:14 Re: Unexplainable execution time difference between two test functions...one using IF (SELECT COUNT(*) FROM...) and the other using IF EXISTS (SELECT 1 FROM...)
Previous Message Tomas Vondra 2018-04-17 10:52:45 Re: Unexplainable execution time difference between two test functions...one using IF (SELECT COUNT(*) FROM...) and the other using IF EXISTS (SELECT 1 FROM...)