pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
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.
Date: Sat, 1 Sep 2012 12:14:04 -0400
Message-ID: <20120901161404.GE2969@momjian.us> (raw)
In-Reply-To: <E1T61KM-0005nD-Qc@wrigleys.postgresql.org>
References: <E1T61KM-0005nD-Qc@wrigleys.postgresql.org>

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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +




view thread (3+ messages)

Message-ID: <20120901161404.GE2969@momjian.us>
Permalink:  ../20120901161404.GE2969@momjian.us/
Also on:    postgresql.org/message-id/20120901161404.GE2969@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, iann@fuelforce.com
  Subject: Re: BUG #7507: pg_restore silently fails when restoring a db with the --create flag and no user.
  In-Reply-To: <20120901161404.GE2969@momjian.us>
  References: <E1T61KM-0005nD-Qc@wrigleys.postgresql.org> <20120901161404.GE2969@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox