Skip site navigation (1) Skip section navigation (2)

Troubles from using pg_dumpall with dbname

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: "pgsql-docs(at)hub(dot)org" <pgsql-docs(at)hub(dot)org>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Troubles from using pg_dumpall with dbname
Date: 1999-09-06 17:21:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-hackers
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.


pgsql-docs by date

Next:From: Christoph SteinbeckDate: 1999-09-06 18:25:57
Subject: Re: [INTERFACES] JDBC Documentation??
Previous:From: Mark DzmuraDate: 1999-09-06 16:02:06
Subject: JDBC Documentation??

pgsql-hackers by date

Next:From: Hannu KrosingDate: 1999-09-06 18:29:20
Subject: Re: [HACKERS] DROP TABLE inside transaction block
Previous:From: Evan SimpsonDate: 1999-09-06 17:10:15
Subject: Re: [HACKERS] DROP TABLE inside transaction block

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group