<varlistentry>
<term><option>-d <replaceable class="parameter">connstr</replaceable></option></term>
<term><option>--dbname=<replaceable 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>
This option is called <literal>--dbname</literal> for consistency with other
client applications, but because <application>pg_receivewal</application>
doesn't connect to any particular database in the cluster, any database
name included in the connection string will be ignored by the server.
However, a database name supplied that way overrides the default
database name (<literal>replication</literal>) for purposes of
looking up the replication connection's password
in <filename>~/.pgpass</filename>. Similarly, middleware or proxies
used in connecting to <productname>PostgreSQL</productname> might
utilize the name for purposes such as connection routing.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h <replaceable class="parameter">host</replaceable></option></term>
<term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
<listitem>
<para>
Specifies the host name of the machine on which the 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>-p <replaceable class="parameter">port</replaceable></option></term>
<term><option>--port=<replaceable class="parameter">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 class="parameter">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_receivewal</application> to prompt for a
password before connecting to a database.
</para>
<para>
This option is never essential, since
<application>pg_receivewal</application> will automatically prompt
for a password if the server demands password authentication.
However, <application>pg_receivewal</application> will waste a
connection attempt finding out that the server wants a password.
In some cases it is worth typing <option>-W</option>