Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 82A512E2D88 for ; Thu, 15 Nov 2007 22:05:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 42409-03 for ; Thu, 15 Nov 2007 22:05:30 -0400 (AST) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by postgresql.org (Postfix) with ESMTP id 7914A2E2D59 for ; Thu, 15 Nov 2007 22:05:51 -0400 (AST) Received: from [127.0.0.1] (online4-new.lnk.telstra.net [139.130.169.227]) (authenticated sender plengada@optusnet.com.au) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lAG25kUt016273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Nov 2007 13:05:49 +1100 Message-ID: <473CFA85.8000409@reynolds.com.au> Date: Fri, 16 Nov 2007 11:03:49 +0900 From: Paul Lambert User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Upgrading a database with pg_dumpall / psql ... References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/160 X-Sequence-Number: 27403 Marc G. Fournier From: wrote: > This is one of those 'stupid questions I hate to ask' ... I've rechecked the > docs to make sure I haven't missed something stupid, and unless I'm blind, > I haven't ... > > I'm trying to upgrade a database from 8.1 -> 8.2 ... on a seperate server, > with 8.2 pg_dump already installed, I do: > > pg_dumpall -U pgsql -h > dump.sql > > Works great. > > Then I upgrade the 8.1 server to 8.2, initdb, and try and do the restore > doing: > > psql -U pgsql -h template1 < dump.sql > > And get a whack of: > > invalid command \n > invalid command \ > invalid command \ni > invalid command \ > invalid command \n > invalid command \n > invalid command \. > > and other errors ... so I'm obviously missing something that is probably > obvious to everyone else ... am I dumping wrong? If I use '--inserts', > it, of course, works like a charm, its only when I try and use COPY ... > Perhaps in your old install standard_conforming_strings was set to off? Where in your new 8.2 install it is on by default. Check the postgresql.conf settings in your new install comparing against your 8.1 install, probably find some things particularly in the platform/version compatibility section are different. -- Paul Lambert Database Administrator AutoLedgers