Re: upgrading from postgresql 8.4 - postgis 1.3.6 to postgresql 9.2/postgis2.0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Athanasios Kostopoulos <athanasios(dot)kostopoulos(at)classmarkets(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: upgrading from postgresql 8.4 - postgis 1.3.6 to postgresql 9.2/postgis2.0
Date: 2013-09-06 14:02:52
Message-ID: 28138.1378476172@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Athanasios Kostopoulos <athanasios(dot)kostopoulos(at)classmarkets(dot)com> writes:
> I have an ancient database (8.4.X) integrated with postGIS 1.3.6. Clearly,
> this while currently working will reach end of life soon and needs to be
> upgraded.

> On a Debian wheezy system, I installed postgres 9.2/postgis2.0 - all from
> the apt repositories provided by postgres. When I try to do things the
> recommended way from postGIS (processing the backup with their perl script)
> during restore I get a few errors and constantly increasing memory usage,
> until the restore process will die with an "out of memory error". When I
> try to restore the "pure" dump, I get a number of errors and an unusuable
> database at the end.

You'd probably be best off to ask about this on the postgis mailing lists;
I'm not sure there are any experts about postgis reading this list.

Having said that, I think one of the main hurdles you're dealing with is
that postgis should now be installed as an "extension" not just a bunch
of loose database objects. What I'd try is doing "create extension
postgis" in the empty 9.2 database and then loading the 8.4 dump file.
You *will* get a bunch of object-already-exists errors with this approach,
and you'll need to read through them all to see if anything is really
wrong or it's just that the already-installed extension kept the old
postgis objects from being reinstalled (which is what you want).
The process the postgis docs recommend is probably smoother when it works,
but it sounds like it may not cope well with a three-major-version jump.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Aditya Rastogi 2013-09-07 13:15:38 Difference in query performance when made from C/C++ client vs. psql client.
Previous Message Samrat Revagade 2013-09-06 12:29:48 Re: Inherit from tables to one main table