Skip site navigation (1) Skip section navigation (2)

Re: 7.1 -> 7.2 on Debian

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: 7.1 -> 7.2 on Debian
Date: 2002-03-13 09:16:25
Message-ID: 1016010986.31964.205.camel@linda (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, 2002-03-13 at 04:16, ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca wrote:
> Hi,
> 
>   About a week ago, I was out apt-get'ing things, and
> various dependencies decided postgresql needed to get
> upgraded.  Fine, I don't use it for much yet, but
> had some data in it.  During the install, I got a
> message saying I needed to do the dump/restore manually,
> and it went along on its merry way.  Tonight, I went to
> do the dump.  Debian has a shell script (supposedly)
> all set up to do this, but somehow I don't think it worked.
> If I run this custom script, I get some output to the screen
> at the end which is postgresql related, but looks like
> error messages from the log.  The dump is 218 bytes long.
> If I try to run the 7.1 dumpall command manually, it tells
> me the postmaster isn't running.  Which is correct, Debian
> has locked out the postmaster since the database dump
> needed to be done manually.

You can start it.  As root do:

  /etc/init.d/postgresql start

and then connect with psql, but this will probably confirm that you have
an empty datbase.

> Can this dump really be only 218 bytes long?  Or should
> a person uninstall 7.2, reinstall 7.1, dump the data,
> uninstall 7.1, reinstall 7.2?

You have probably hit a bug in the automatic upgrade process of the
Debian packaging.  Your old database is stored in
$PGDATA/../data.xx.save (where xx is the old version), but needs the 7.1
binaries to read it.  These should be stored in
/usr/lib/postgresql/dumpall/7.1 but there are sometimes problems along
the way.

This procedure is quite tricky, since it needs cooperation between the
old and the new versions of the package.  The latest release (7.2-5) has
improved the procedure and may help; it is still in unstable.

Please follow this procedure.

In each of the directories in $PGDATA/.. check the contents of
PG_VERSION, so as to be sure which is which.  Make sure that the 7.1
directory is called $PGDATA.  It would be wise to have a separate backup
of this.

Reinstall 7.1.3-7, check that the data is all present and correct and
then retry the upgrade using 7.2-5.  Then let me know how it goes.  If
possible, use script to capture the entire upgrade session.

Since this is a Debian packaging issue, further discussion would be more
appropriate in private email or on the Debian mailing lists.

-- 
Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Who is like Thee among the gods, O Lord? Who is like
      Thee, majestic in holiness, awesome in praises,
      working wonders?"
                              Exodus 15:11


In response to

pgsql-novice by date

Next:From: John TaylorDate: 2002-03-13 14:16:19
Subject: Re: PostgreSQL cannot run.
Previous:From: ghaverlaDate: 2002-03-13 04:16:36
Subject: 7.1 -> 7.2 on Debian

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group