Re: BUG #14636: pg_dumpall -d

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: adrian(dot)klaver(at)aklaver(dot)com
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14636: pg_dumpall -d
Date: 2017-05-01 05:45:31
Message-ID: CAB7nPqSbeBZKTPkO__0OLnKZOvg9HNXc_t97=bvyKMkAEv-GVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, May 1, 2017 at 7:08 AM, <adrian(dot)klaver(at)aklaver(dot)com> wrote:
> Pulled the nightly build of Postgres 10:
> 2017-04-30 20:30:26
> Testing dump/restore from a 9.6 instance to the 10 instance. Tried dumping
> the globals using pg_dumpall and connected using:
> aklaver(at)tito:~> /usr/local/pgsql10/bin/pg_dumpall -g -d postgres -U postgres
> -p 5432 -f production_globals.sql
> pg_dumpall: missing "=" after "postgres" in connection info string
>
> This not what I usually do and when I used -l it worked as expected. The bug
> is that the docs say:
> https://www.postgresql.org/docs/devel/static/app-pg-dumpall.html
>
> "-d connstr
> --dbname=connstr
>
> Specifies parameters used to connect to the server, as a connection
> string. See Section 33.1.1 for more information.
>
> The option is called --dbname for consistency with other client
> applications, but because pg_dumpall needs to connect to many databases,
> database name in the connection string will be ignored. Use -l option to
> specify the name of the database used to dump global objects and to discover
> what other databases should be dumped.
> "
>
> Instead an error is raised.

The documentation and the behavior look correct to me. You did not
specify a correct connection string using -d, and just used a database
name. If you want to have a database name ignored in the connection
string defined by -d, you need to use "dbname=postgres".
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Adrian Klaver 2017-05-01 13:20:54 Re: BUG #14636: pg_dumpall -d
Previous Message tomasz.kontusz 2017-05-01 00:06:09 BUG #14637: Tests fail with pl_PL.UTF-8 locale