Re: downgrading a database - Mailing list pgsql-general

From Adrian Klaver
Subject Re: downgrading a database
Date
Msg-id 50D75DA0.8010602@gmail.com
Whole thread Raw
In response to downgrading a database  (Heine Ferreira <heine.ferreira@gmail.com>)
List pgsql-general
On 12/23/2012 08:54 AM, Heine Ferreira wrote:
> Hi
>
> Is it possible to downgrade a Postgresql database from a
> newer to an older version?
> If so how do you do it?
> Let's assume you are not using any features in the
> newer version.
> Say from 9.2 to 9.1.

Would need to be done as a test first.

I just tried it from 9.2 --> 9.0 and it worked with one exception

Lessons learned.

1) First pg_dump will not dump forward. In other words you cannot use
the 9.1 version to dump a 9.2 database. You will need to use the 9.2
version. This means it may include new syntax not understood by 9.1 even
if you do not make use of new features.

2) The exception was CREATE EXTENSION for plpgsql. The switch over from
CREATE LANGUAGE to CREATE EXTENSION for languages took place in 9.1, so
this should not bite you.

3) I did the dump as -Fc. Remember you can always create a text version
of a custom format dump by using the -f option to pg_restore to restore
to a file instead of a database.




>
> Thanks
>
> H.F.
>


--
Adrian Klaver
adrian.klaver@gmail.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results
Next
From: Merlin Moncure
Date:
Subject: Re: Pipelining INSERTs using libpq