[postgis-users] Updating to 1.2.0 on Win gives Linux error?
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Fri Jan 26 09:17:56 PST 2007
On Fri, 2007-01-26 at 17:32 +0100, Barend K=?ISO-8859-1?B?9g==?=bben
wrote:
(cut)
> Can anybody shed some light on how to get this upgrade done...?
Hi Barend,
The problem here is that the dump is still referencing the old PostGIS
DLL while you are trying to load it into your new database.
Assuming that you have installed PostGIS on your new machine then I
would do the following to get a working install:
1. Create a new PostGIS-enabled database of the same name under
PostgreSQL 8.2.
2
a) Method 1: If you only have a few geometry tables, use the -t option
for pg_dump to dump each of your geometric tables into separate dump
files. Once you have done that, you also need to create a dump for the
geometry_columns table.
Once you have done this, restore all of the dump files for your tables
using pg_restore. Finally, do a "data only" restore of your dump of the
geometry_columns table into your new PostgreSQL 8.2 database.
b) Method 2: This is recommended if you have lots of geometric tables,
but requires more advanced knowledge of PostgreSQL.
Use pg_dump with the -Fc argument to create a custom format dump of your
entire database.
Use pg_restore with the -l option to create a text file containing a
list of the contents of your dump file.
>From this text file, remove everything that isn't a reference to any of
your tables, indices or the geometry_columns table.
Restore your dump file into the new PostgreSQL 8.2 database using the -L
option to pg_restore to specify your text file as a list of items to
restore.
Hopefully this will give you enough information to copy your database
across to your new machine, but you still need to read the PostgreSQL
manual with regards to parameters being passed to pg_dump and
pg_restore. Method 1 is a lot easier than method 2 if you are not too
familiar with PostgreSQL.
Finally, I would recommend you upgrade your new machine to latest 1.2.1
installer, since 1.2.0 has a known issue with PostgreSQL 8.2.
HTH,
Mark.
More information about the postgis-users
mailing list