Re: How to use pg_upgrade for beta versions

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: René Leonhardt <rene(dot)leonhardt(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to use pg_upgrade for beta versions
Date: 2014-07-26 18:38:16
Message-ID: 53D3F598.8040008@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/26/2014 07:56 AM, René Leonhardt wrote:
> It has been recommended to pg_upgrade from 9.4 beta 1 to 2:
> http://www.postgresql.org/message-id/20e710fd3e4790ee1051aa1e107d3708@postgresql.org

It is recommended in the spirit of testing the changes to the pg_upgrade
code, so it is a soft recommendation. In any event I do not remember
pg_upgrade being integrated into the apt-get process. This is something
you will have to do separately.

>
> How do I that on the Ubuntu 14.04.1 PPA?
> http://www.postgresql.org/download/linux/ubuntu/

Are you actually using the PPA, I thought that only went up to 12.04?

Or are you using the Postgres repo?:

http://apt.postgresql.org/pub/repos/apt/

>
> Upgrading directly is not possible:
> $ sudo apt-get dist-upgrade

Not sure you want to do a dist-upgrade if you want to test pg_upgrade,
as it will want to replace the version of Postgres and lead to the ERROR
notice below.

> Preparing to unpack .../postgresql-9.4_9.4~beta2-1.pgdg14.04+1_amd64.deb ...
> ERROR: The database format changed between beta 1 and 2. Please dump
> your 9.4 clusters first and remove them before upgrading the package.
> dpkg: error processing archive
> /var/cache/apt/archives/postgresql-9.4_9.4~beta2-1.pgdg14.04+1_amd64.deb
> (--unpack):
> subprocess new pre-installation script returned error exit status 1
> Errors were encountered while processing:
> /var/cache/apt/archives/postgresql-9.4_9.4~beta2-1.pgdg14.04+1_amd64.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> Executing apt-get install -f afterwards shows the same error.

It would seem you would want to do a straight install of 9.4beta2 where
the package manager sets up a separate instance for it and then use
pg_upgrade to move the data from beta1 to beta2. Otherwise you could go
the dump/restore route.

>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2014-07-27 01:09:56 Re: How to use pg_upgrade for beta versions
Previous Message René Leonhardt 2014-07-26 14:56:14 How to use pg_upgrade for beta versions