1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Add -d option to pg_basebackup and pg_receivexlog, for connection string.

Without this, there's no way to pass arbitrary libpq connection parameters
to these applications. It's a bit strange that the option is called
-d/--dbname, when in fact you can *not* pass a database name in it, but it's
consistent with other client applications where a connection string is also
passed using -d.

Original patch by Amit Kapila, heavily modified by me.
This commit is contained in:
Heikki Linnakangas
2013-02-25 14:48:27 +02:00
parent 786170d74f
commit aa05c37e82
6 changed files with 109 additions and 23 deletions

View File

@ -358,6 +358,23 @@ PostgreSQL documentation
The following command-line options control the database connection parameters.
<variablelist>
<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 connection
string. See <xref linkend="libpq-connstring"> for more information.
</para>
<para>
The option is called <literal>--dbname</> for consistency with other
client applications, but because <application>pg_basebackup</application>
doesn't connect to any particular database in the cluster, database
name in the connection string will be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h <replaceable class="parameter">host</replaceable></option></term>
<term><option>--host=<replaceable class="parameter">host</replaceable></option></term>

View File

@ -122,6 +122,23 @@ PostgreSQL documentation
The following command-line options control the database connection parameters.
<variablelist>
<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 connection
string. See <xref linkend="libpq-connstring"> for more information.
</para>
<para>
The option is called <literal>--dbname</> for consistency with other
client applications, but because <application>pg_basebackup</application>
doesn't connect to any particular database in the cluster, database
name in the connection string will be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h <replaceable class="parameter">host</replaceable></option></term>
<term><option>--host=<replaceable class="parameter">host</replaceable></option></term>