[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [DebianGIS] postgis trouble



Hi Alex,

Sorry for the long post, but it does adres a few issues which I
consider to be important...

You'd have to ask Martin Pitt about accomodating postgis in the pg7.5
package, but I had a small discussion with him about it and he is
(very understandibly!) reluctant to take care of other packages.
But I do not think that will be a problem in this case: If You make
all postgis packages dependend on the new postgresql
multicluster/multiversion setup and for backwards compat. make just
one package dependend on postgresql 7.4, and the rest from 7.5 onwards
it should work. And backwards compatibility might not be a big issue
because most people will have a manual configuration anyway, since
postgis was not available in debian.

At the moment postgis is still not supported in debian, apart from the
broken packages available now, but that gives you the opportunity to
follow the new setup, since people using the old packages from
unstable will hopefully be knowledgable enough to manually correct
problems.

Anyway,
Upgrading with multicluster environment can be easy, you do NOT have
to drop the old database so nothing is lost.

The setup could be:
1 Create new database in a new cluster (this could be pg7.5 with
postgis1 or pg8 with posgis0.9 or any other combi). Load new
lwpostgis.sql
2 dump old with SQL insert
3 Load this dump into new database as an ordinary user! (This tip
circled in this maillist and could be a neat workaround. The problem
of upgrading is that a dump attempts to restore the old datatypes,
which is not a good thing. Now an ordinary user may create and fill
tables, but is not allowed to change datatypes... so it will probably
protest 600 times that function creation failed, but hopefully it will
create and fill tables.)

Note that you do not HAVE to upgrade the databases, in the multi
cluster environment it is perfectly ok to have multiple versions.
Database administrators should be able to upgrade a database manually,
this automatic upgrade is only a service to debian users, if it fails
the old database is still there! If I'm not mistaken, for most Linux
distributions it would be very difficult to even attempt an
'automated' upgrade. But if we get it to work, it is very nice indeed.

There is one caveat: postgis also has different versions so special
care has to be taken that in all cases the correct version of psql,
lwpostgis.sql, shp2pgsql etc is called
o especially in the cases that people migrate from pg7.4 to 7.5. At
first they should keep the same version of postgis, otherwise
databases will be corrupt.
o also in the cases that people need postgis0.9 for pg8.0 AND
postgis1.0 for pg8.0. (I for instance have legacy user interfaces that
I do not care to upgrade because we are developping a new system
anyway. I made a manual setup in the multicluster version and just
made sure that all the correct paths are taken when calling certain
versions.).

Like I said, because there is not a postgis package in stable yet, you
do have the opportunity to change some of the set-up.
And I strongly suggest renaming the packages to postgresql-7.5-postgis etc
it drops the library adjective and shows in the name exactly for which
version of pgsql it is intended and most other packages follow this
convention.

Again apologies for the long ramble, its just my 2p worth.

Regards,

Floris


On 07/10/05, alex bodnaru <alexbodn@012.net.il> wrote:
> hi,
>
> may we piggyback on postgresql 7.5 and ask to copy libraries also, and
> just be prepared to eventually find them at new location with newer
> versions of libpostgis1-pg[80|74] ?
>
> alex
>
> F.Sluiter wrote:
> > Hi Paolo,
> >
> > There are several approaches to this problem (I ran into the same
> > while upgrading).
> >
> > First: your database will work, it just cannot find the proper postgis library.
> > What happened is that postgresql7.5 just changed the paths of most of
> > the binaries, but none of them are replaced (it is still postgresql
> > 7.4).
> > It did not copy the postgis library to the correct path, so you have
> > to do that manually.
> > cp /usr/lib/postgresql/lib/libpostgis* /usr/lib/postgresql/7.4/lib/
> >
> > now postgresql can start and find your libraries again.
> > /etc/init.d postgresql start
> >
> > If you do want to upgrade from postgresql 7.4 to 8.0 I strongly
> > recommend installing postgresql-common and study its setup (it allows
> > multiple concurrent versions of postgresql/postgis).
> > documentation is then in "man pg_ctlcluster" and on:
> > http://people.debian.org/~mpitt/postgresql-ng.html
> >
> > Now, you can (manually) dump the original tables SEPARATELY (not the
> > whole database!) and upload them in the new server. Do follow the
> > guidelines in the postgis documentation and DO NOT attempt this
> > automatically with scripts etc. I did, and it didn't work (yet). The
> > new postgis packages might solve this in the future, but you should
> > not use it in a production environment yet.
> > The main thing is that some of the datatypes and functions changed, so
> > the libraries are not binary compatible and the functionlist/datatypes
> > will not migrate properly.
> >
> > Hopefully Alex (with a little help from us) can solve this
> > updating/migrating very soon...
> >
> > Let me know if you need more help!
> >  Succes!
> >
> > Floris
> >
> > _______________________________________________
> > Pkg-grass-general mailing list
> > Pkg-grass-general@lists.alioth.debian.org
> > http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-general
> >
>



Reply to: