Re: Request clarification w/ PG_DUMPALL -d. - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Request clarification w/ PG_DUMPALL -d.
Date
Msg-id 86b64f97-7f3a-dd2e-306b-62cd3f4c3801@aklaver.com
Whole thread Raw
In response to Request clarification w/ PG_DUMPALL -d.  (ERR ORR <rd0002@gmail.com>)
List pgsql-general
On 8/30/20 7:31 AM, ERR ORR wrote:
> I'm trying to migrate a 9.5 DB to a current version using PG_DUMPALL.
> It reclaims that what I pass in the -d parameter is missing a "=" and 
> the man directs me to look at chapter 31.1.1 Connection Strings of the 
> dox PDF.
> The Problem is that there are different connection strings listed there 
> and I don't know which one I should use.
> Would be happy if somebody could clarify exactly what value/s I need to 
> use for the -d parameter of PG_DUMPALL.

Don't use it per the docs:

https://www.postgresql.org/docs/12/app-pg-dumpall.html

"The option is called --dbname for consistency with other client 
applications, but because pg_dumpall needs to connect to many databases, 
the database name in the connection string will be ignored. Use the -l 
option to specify the name of the database used for the initial 
connection, which will dump global objects and discover what other 
databases should be dumped."

Either use -l or nothing and pg_dump will connect to postgres database.

-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: ERR ORR
Date:
Subject: Request clarification w/ PG_DUMPALL -d.
Next
From: Yogesh Sharma
Date:
Subject: Postgres DB hacked.