X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B52E2475956 for ; Thu, 6 Feb 2003 13:41:55 -0500 (EST) Received: from sabre.velocet.net (sabre.velocet.net [216.138.209.205]) by postgresql.org (Postfix) with ESMTP id E4D244758E6 for ; Thu, 6 Feb 2003 13:41:54 -0500 (EST) Received: from trooper.velocet.ca (trooper.velocet.net [216.138.242.2]) by sabre.velocet.net (Postfix) with ESMTP id 6A01C13806C; Thu, 6 Feb 2003 13:41:50 -0500 (EST) Received: by trooper.velocet.ca (Postfix, from userid 66) id EF5A474CE3; Thu, 6 Feb 2003 13:41:45 -0500 (EST) Received: by canoe.velocet.net (Postfix, from userid 101) id 90E52567628; Thu, 6 Feb 2003 12:16:07 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15938.38999.444213.847989@canoe.velocet.net> Date: Thu, 6 Feb 2003 12:16:07 -0500 To: Geoffrey Wossum Cc: pgsql-admin@postgresql.org Subject: Problems upgrading from 7.1.3 In-Reply-To: <200302051128.35997.geoffrey@pager.net> References: <200302051128.35997.geoffrey@pager.net> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/89 X-Sequence-Number: 7287 >>>>> "Geoffrey" == Geoffrey Wossum 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@velocet.net | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================