X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1B5774797BC for ; Fri, 31 Jan 2003 21:09:49 -0500 (EST) Received: from otserver.onsitetech.com (unknown [66.239.248.99]) by postgresql.org (Postfix) with ESMTP id 50A84476226 for ; Fri, 31 Jan 2003 19:46:16 -0500 (EST) Received: from onsitetech.com (unverified [66.89.133.75]) by otserver.onsitetech.com (Rockliffe SMTPRA 4.5.6) with ESMTP id for ; Fri, 31 Jan 2003 16:41:36 -0800 Message-ID: <3E3B18DA.4010601@onsitetech.com> Date: Fri, 31 Jan 2003 16:46:18 -0800 From: Ian Burrell User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: pg_restore problem with 7.3.1 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/3 X-Sequence-Number: 7201 I am upgrading my PostgreSQL install from 7.2.3 to 7.3.1. I ran into a problem with pg_restore creating the database. I am not sure if this is a documentation problem or a real bug. I have one database with BLOBs and used tar format backup: "pg_dump -Ft -b mpmx > backup.tar". I saw the -C option for pg_restore to create the database. The man page also says that with the -C option, the -d option specifies the database create the database from pg_restore -C -d template1 backup.tar Instead of creating the mpmx database, the command loaded everything into the template1 database. Is the man page correct about the operation of the -C option? Should I have run things differently? I noticed that without the -d option, pg_restore spits out a script to restore the database. Should I create the database manually and restore it by piping pg_restore into psql? How can I return template1 to its initial state? - Ian