pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: pgsql-docs@hub.org <pgsql-docs@hub.org>
To: pgsql-hackers <pgsql-hackers@postgreSQL.org>
Subject: Troubles from using pg_dumpall with dbname
Date: Mon, 06 Sep 1999 20:21:02 +0300
Message-ID: <37D3F7FE.D5A286D9@tm.ee> (raw)

This is a warning an a request for change in pg_dumpall behaviour.

One of my co-workers accidentally used pg_dumpall instead of pg_dump 
giving it also a dbname argument. According to man pg_dumpall:

  pg_dumpall takes all pg_dump options, but -f and dbname should 
  not be used.

the results of using dbname are quite bizarre - namely it dumps 
statements for creating all existing databases, but inside them 
it puts the contents of the database given by dbname !

As this feature seems to be totally useless, I suggest that 
pg_dumpall be modified to produce an error when given dbname 
argument instead of silently producing mostly useless db dump.

In our case this went unnoticed until he tried to recreate his 
database by doing 'psql dbname <dumpfile', which resulted in 
destroying pg_user table and messing up many other databses :(

If this can't be changed, at least the behaviour should be 
documented more thoroughly in big red letters.

---------
Hannu



Message-ID: <37D3F7FE.D5A286D9@tm.ee>
Permalink:  ../37D3F7FE.D5A286D9@tm.ee/
Also on:    postgresql.org/message-id/37D3F7FE.D5A286D9@tm.ee

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: hannu@tm.ee, pgsql-docs@hub.org, pgsql-hackers@postgreSQL.org
  Subject: Re: Troubles from using pg_dumpall with dbname
  In-Reply-To: <37D3F7FE.D5A286D9@tm.ee>

* 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