class="parameter">connstr</replaceable></option></term>
<listitem>
<para>
Specifies parameters used to connect to the server, as a <link
linkend="libpq-connstring">connection string</link>; these
will override any conflicting command line options.
</para>
<para>
The option is called <literal>--dbname</literal> for consistency with other
client applications, but because <application>pg_dumpall</application>
needs to connect to many databases, the database name in the
connection string will be ignored. Use the <literal>-l</literal>
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h <replaceable>host</replaceable></option></term>
<term><option>--host=<replaceable>host</replaceable></option></term>
<listitem>
<para>
Specifies the host name of the machine on which the database
server is running. If the value begins with a slash, it is
used as the directory for the Unix domain socket. The default
is taken from the <envar>PGHOST</envar> environment variable,
if set, else a Unix domain socket connection is attempted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-l <replaceable>dbname</replaceable></option></term>
<term><option>--database=<replaceable>dbname</replaceable></option></term>
<listitem>
<para>
Specifies the name of the database to connect to for dumping global
objects and discovering what other databases should be dumped. If
not specified, the <literal>postgres</literal> database will be used,
and if that does not exist, <literal>template1</literal> will be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p <replaceable>port</replaceable></option></term>
<term><option>--port=<replaceable>port</replaceable></option></term>
<listitem>
<para>
Specifies the TCP port or local Unix domain socket file
extension on which the server is listening for connections.
Defaults to the <envar>PGPORT</envar> environment variable, if
set, or a compiled-in default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-U <replaceable>username</replaceable></option></term>
<term><option>--username=<replaceable>username</replaceable></option></term>
<listitem>
<para>
User name to connect as.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-w</option></term>
<term><option>--no-password</option></term>
<listitem>
<para>
Never issue a password prompt. If the server requires
password authentication and a password is not available by
other means such as a <filename>.pgpass</filename> file, the
connection attempt will fail. This option can be useful in
batch jobs and scripts where no user is present to enter a
password.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-W</option></term>
<term><option>--password</option></term>
<listitem>
<para>
Force <application>pg_dumpall</application> to prompt for a
password before connecting to a database.
</para>
<para>
This option is never essential, since
<application>pg_dumpall</application> will automatically prompt
for a password if the server demands password authentication.
However, <application>pg_dumpall</application> will waste a
connection attempt finding out that the server wants a password.
In some cases