Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T7qKk-0008Th-B1 for pgsql-bugs@postgresql.org; Sat, 01 Sep 2012 16:14:06 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T7qKi-0008DH-NA for pgsql-bugs@postgresql.org; Sat, 01 Sep 2012 16:14:05 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1T7qKi-0007xf-2u; Sat, 01 Sep 2012 12:14:04 -0400 Date: Sat, 1 Sep 2012 12:14:04 -0400 From: Bruce Momjian To: iann@fuelforce.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7507: pg_restore silently fails when restoring a db with the --create flag and no user. Message-ID: <20120901161404.GE2969@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201209/6 X-Sequence-Number: 34001 On Mon, Aug 27, 2012 at 03:34:10PM +0000, iann@fuelforce.com wrote: > The following bug has been logged on the website: > > Bug reference: 7507 > Logged by: Ian Nobile > Email address: iann@fuelforce.com > PostgreSQL version: 9.1.4 > Operating system: Mac OS X Version 10.8 > Description: > > Attempting to restore a db using pg_restore to a new database server using > the --create and --dbname flags fails silently if the db owner username does > not exist in the new db or the -O flag is not used. > Command used: > pg_restore --create --verbose --dbname=testserver > /Volumes/USBLINKS1/hostname.testserver.net_postgres_database Well, I tried this and it showed a proper error: $ pg_restore --create --verbose -U yy --dbname=testserver /rtmp/xx pg_restore: connecting to database for restore pg_restore: [archiver (db)] connection to database "testserver" failed: FATAL: role "yy" does not exist -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +