Problems upgrading from 7.1.3

From: David Gilbert <dgilbert(at)velocet(dot)ca>
To: Geoffrey Wossum <geoffrey(at)pager(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Problems upgrading from 7.1.3
Date: 2003-02-06 17:16:07
Message-ID: 15938.38999.444213.847989@canoe.velocet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>>>>> "Geoffrey" == Geoffrey Wossum <geoffrey(at)pager(dot)net> writes:

Geoffrey> Hi all, I have a database cluster running on PostgreSQL
Geoffrey> 7.1.3 compiled from source, on Debian Linux. I want to
Geoffrey> upgrade the cluster to PostgreSQL 7.3.x.

Geoffrey> In order to get the data over, I ran: PGUSER=postgres
Geoffrey> /usr/local/pgsql/bin/pg_dumpall > survey1.sql on the
Geoffrey> production machine running 7.1.3.

Geoffrey> I then took that file over to test machine running
Geoffrey> PostgreSQL 7.3.1, and ran: PGUSER=postgres
Geoffrey> /usr/local/pgsql-7.3.1/bin/psql -d template1 -f survey1.sql

Geoffrey> I got lots of errors about "Invalid command \N" in the COPY
Geoffrey> xxx FROM statements, and most of the tables were completely
Geoffrey> empty.

I find that the whole database dumps do not have 'create user' and
'create group' commands. Since I only have one group (admin) and many
users, I:

for i in `cat survey1.sql | egrep ^.connect\|^GRANT\|^REVOKE | rev |
cut -d\ -f1 | tr -d \;\" | rev | sort -u | grep -v PUBLIC`; do
psql -c "create user $i" template1
done

... add grep -v's to taste. Now... this doesn't recreate users with
'createuser' or 'createdatabase' permissions. You may want to adjust
this.

Dave.

--
============================================================================
|David Gilbert, Velocet Communications. | Two things can only be |
|Mail: dgilbert(at)velocet(dot)net | equal if and only if they |
|http://daveg.ca | are precisely opposite. |
=========================================================GLO================

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurette Cisneros 2003-02-06 18:03:52 consistency checks
Previous Message Tom Lane 2003-02-06 16:26:00 Re: Problems upgrading from 7.1.3