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: 37D3F7FE.D5A286D9@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-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.

---------
Hannu

Browse pgsql-docs by date

  From Date Subject
Next Message Christoph Steinbeck 1999-09-06 18:25:57 Re: [INTERFACES] JDBC Documentation??
Previous Message Mark Dzmura 1999-09-06 16:02:06 JDBC Documentation??

Browse pgsql-hackers by date

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