Re: downgrading a database

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Heine Ferreira <heine(dot)ferreira(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: downgrading a database
Date: 2012-12-23 19:38:08
Message-ID: 50D75DA0.8010602@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-12-23 20:23:57 Re: Pipelining INSERTs using libpq
Previous Message Tom Lane 2012-12-23 17:55:06 Re: Using POSIX Regular Expressions on xml type fields gives inconsistent results