Re: How to migrate from PGSQL 9.3 to 9.6

Поиск
Список
Период
Сортировка
От Sinclair, Ian D (Ian)
Тема Re: How to migrate from PGSQL 9.3 to 9.6
Дата
Msg-id 773E6ECA62A012488950CF4AD529F80546E9E409@AZ-US1EXMB05.global.avaya.com
обсуждение исходный текст
Ответ на Re: How to migrate from PGSQL 9.3 to 9.6  (John R Pierce <pierce@hogranch.com>)
Ответы Re: How to migrate from PGSQL 9.3 to 9.6  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: How to migrate from PGSQL 9.3 to 9.6  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general

The actual upgrade will be that I have an existing server running 9.3 on RHEL 6.2. We’ll have to do a backup of the database, then deploy a new OVA to get to RHEL 7 with PG 9.6, then restore the database. Are there any specific steps that I’ll have to execute in the scripts that will restore the database to get the 9.3 data to work with 9.6?

 

Since all my users will be getting to 9.6 from a new system deployment, not by any sort of partial upgrade, do I need to worry about trying to get a correct version of the setup script with upgrade handling? (Other than whatever I need for the answer above.)

 

Thanks

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of John R Pierce
Sent: November 29, 2016 5:47 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How to migrate from PGSQL 9.3 to 9.6

 

On 11/29/2016 2:20 PM, Sinclair, Ian D (Ian) wrote:

I’ve found the RPMS I need, but I’ve come across a setup file that I think I need to get a correct version of. I found references to postgresql-setup, but I have a feeling that I may need a version specific copy of that script. If I get the latest version for 9.6 will it recognize my 9.3 database and upgrade it correctly? Or do I need to edit the content to indicate that the old version is 9.3. The PGPREVMAJORVERSION reference below is what makes me wonder.

 ....

 

The current database is running on RHEL 6 and the new version will be running on RHEL 7.2. Does that affect what I need? I found an exchange in the archives about someone upgrading 9.4 to 9.5 and having problems getting the correct upgrade syntax. If you can provide that it would be greatly appreciated.


presumably these are two separate machines?    depending on how large your databases are, it might just be easiest to do this...

on the old system: configure the existing postgres to allow network connections from the new system.

on the new system:
    (install postgres...   )
    (initialize postgres database engine...)
    (configure postgresql.conf parameters for suitable performance (in particular, ensure maintenance_work_mem is 1GB or so assuming you have lots of ram, this will *hugely* speed up index creation)
    # su - postgres
    (create $HOME/.pgpass with the password to the old system's postgres user)
    $ pg_dumpall -h oldsystem  | psql

however, if the databases are rather large, this could take many hours or even days.


 

I believe I also need to upgrade our JDBC version. What is the minimum version that is compatible with PGSQL 9.6?


I would update to the latest version of the pg jdbc driver, not the 'minimum' version.    why mess with bugs that have been fixed ?   choose the proper jdbc driver based on your Java JRE version (eg, jdbc42 for Java 8)

 

-- 
john r pierce, recycling bits in santa cruz

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: select function alias
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Index is not used for "IN (non-correlated subquery)"