Confusing link in streaming replication section

Lists: pgsql-docs
From: Thom Brown <thombrown(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Confusing link in streaming replication section
Date: 2010-02-10 22:43:13
Message-ID: bddc86151002101443t69d6e2e7rd6c76ea6287e6061@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

Hi all,

I'm looking at the latest docs for PostgreSQL 9.0
(http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html)
and under the description of primary_conninfo, there's a link to
section 30.1 (http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html)
which is supposed to describe the string format. Having looked at
that page, however, it's not crystal clear what is meant by this
string format. One can only assume it's referring to the
PQconnectdbParams section and the keywords that can be used for it,
which would also apply to a connection string, but there's no mention
of a "format" on that page.

I'm wondering if there should be another area added to the
documentation which simplifies this information, or at least presents
it differently, so that it isn't only within the context of the libpq
C library. Either that, or clarify what information should be gleaned
from the page being linked to.

Thanks

Thom


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-12 01:57:53
Message-ID: 3f0b79eb1002111757y3d11102n7fdfcee8f332f6d4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On Thu, Feb 11, 2010 at 7:43 AM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
> I'm looking at the latest docs for PostgreSQL 9.0
> (http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html)
> and under the description of primary_conninfo, there's a link to
> section 30.1 (http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html)
> which is supposed to describe the string format.  Having looked at
> that page, however, it's not crystal clear what is meant by this
> string format.  One can only assume it's referring to the
> PQconnectdbParams section and the keywords that can be used for it,
> which would also apply to a connection string, but there's no mention
> of a "format" on that page.

Thanks for the report!

Though at first PQconnectdb() had been linked by the SR doc, instead
PQconnectdbParams() seems to have been linked wrongly when it was committed.
How about changing the link so as to point to PQconnectdb() again? Or
copy-pasting the following description from PQconnectdb() to the SR doc?

-----------
The passed string can be empty to use all default parameters, or it can
contain one or more parameter settings separated by whitespace. Each
parameter setting is in the form keyword = value. Spaces around the equal
sign are optional. To write an empty value, or a value containing spaces,
surround it with single quotes, e.g., keyword = 'a value'. Single quotes
and backslashes within the value must be escaped with a backslash,
i.e., \' and \\.

The currently recognized parameter key words are the same as above.
-----------

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Thom Brown <thombrown(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-12 16:15:03
Message-ID: bddc86151002120815m5b9e6922p90aba868b5dae9d7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On 12 February 2010 01:57, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Thu, Feb 11, 2010 at 7:43 AM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>> I'm looking at the latest docs for PostgreSQL 9.0
>> (http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html)
>> and under the description of primary_conninfo, there's a link to
>> section 30.1 (http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html)
>> which is supposed to describe the string format.  Having looked at
>> that page, however, it's not crystal clear what is meant by this
>> string format.  One can only assume it's referring to the
>> PQconnectdbParams section and the keywords that can be used for it,
>> which would also apply to a connection string, but there's no mention
>> of a "format" on that page.
>
> Thanks for the report!
>
> Though at first PQconnectdb() had been linked by the SR doc, instead
> PQconnectdbParams() seems to have been linked wrongly when it was committed.
> How about changing the link so as to point to PQconnectdb() again? Or
> copy-pasting the following description from PQconnectdb() to the SR doc?
>
> -----------
> The passed string can be empty to use all default parameters, or it can
> contain one or more parameter settings separated by whitespace. Each
> parameter setting is in the form keyword = value. Spaces around the equal
> sign are optional. To write an empty value, or a value containing spaces,
> surround it with single quotes, e.g., keyword = 'a value'. Single quotes
> and backslashes within the value must be escaped with a backslash,
> i.e., \' and \\.
>
> The currently recognized parameter key words are the same as above.
> -----------

Hmmm... well that last sentence refers to parameter key words which
won't appear on the SR page unless you copy and paste all that
information too.

I think the problem I have with there being a link to the libpq
control functions page is that the context of the settings isn't the
same, meaning the text on that page is specifically targetting people
looking for libpq info, rather than providing more generic information
which may be better placed in an appendix or something similar.

May I suggest a page on connection paramaters/connection strings which
can be referenced by multiple locations? Otherwise I can imagine the
same information being presented a number of times throughout the
documentation.

Thanks

Thom


From: Thom Brown <thombrown(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-24 13:45:18
Message-ID: bddc86151002240545m70f40ca9ge45f573f60833c32@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On 12 February 2010 16:15, Thom Brown <thombrown(at)gmail(dot)com> wrote:
> On 12 February 2010 01:57, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On Thu, Feb 11, 2010 at 7:43 AM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>>> I'm looking at the latest docs for PostgreSQL 9.0
>>> (http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html)
>>> and under the description of primary_conninfo, there's a link to
>>> section 30.1 (http://developer.postgresql.org/pgdocs/postgres/libpq-connect.html)
>>> which is supposed to describe the string format.  Having looked at
>>> that page, however, it's not crystal clear what is meant by this
>>> string format.  One can only assume it's referring to the
>>> PQconnectdbParams section and the keywords that can be used for it,
>>> which would also apply to a connection string, but there's no mention
>>> of a "format" on that page.
>>
>> Thanks for the report!
>>
>> Though at first PQconnectdb() had been linked by the SR doc, instead
>> PQconnectdbParams() seems to have been linked wrongly when it was committed.
>> How about changing the link so as to point to PQconnectdb() again? Or
>> copy-pasting the following description from PQconnectdb() to the SR doc?
>>
>> -----------
>> The passed string can be empty to use all default parameters, or it can
>> contain one or more parameter settings separated by whitespace. Each
>> parameter setting is in the form keyword = value. Spaces around the equal
>> sign are optional. To write an empty value, or a value containing spaces,
>> surround it with single quotes, e.g., keyword = 'a value'. Single quotes
>> and backslashes within the value must be escaped with a backslash,
>> i.e., \' and \\.
>>
>> The currently recognized parameter key words are the same as above.
>> -----------
>
> Hmmm... well that last sentence refers to parameter key words which
> won't appear on the SR page unless you copy and paste all that
> information too.
>
> I think the problem I have with there being a link to the libpq
> control functions page is that the context of the settings isn't the
> same, meaning the text on that page is specifically targetting people
> looking for libpq info, rather than providing more generic information
> which may be better placed in an appendix or something similar.
>
> May I suggest a page on connection paramaters/connection strings which
> can be referenced by multiple locations?  Otherwise I can imagine the
> same information being presented a number of times throughout the
> documentation.
>
> Thanks
>
> Thom
>

Anyone had any thoughts on this?

Thom


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 02:45:18
Message-ID: 3f0b79eb1002241845p782c5e49v53a48be5aa67abf0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

Sorry for the delay.

On Sat, Feb 13, 2010 at 1:15 AM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
> I think the problem I have with there being a link to the libpq
> control functions page is that the context of the settings isn't the
> same, meaning the text on that page is specifically targetting people
> looking for libpq info, rather than providing more generic information
> which may be better placed in an appendix or something similar.

Since conninfo is tied closely to libpq, its information should
be in libpq chapter rather than an appendix or another chapter. No?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Thom Brown <thombrown(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 08:03:44
Message-ID: bddc86151002250003r2c85958bsc47ebc0b5c7ed545@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On 25 February 2010 02:45, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> Sorry for the delay.
>
> On Sat, Feb 13, 2010 at 1:15 AM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>> I think the problem I have with there being a link to the libpq
>> control functions page is that the context of the settings isn't the
>> same, meaning the text on that page is specifically targetting people
>> looking for libpq info, rather than providing more generic information
>> which may be better placed in an appendix or something similar.
>
> Since conninfo is tied closely to libpq, its information should
> be in libpq chapter rather than an appendix or another chapter. No?
>

Yes, you're probably right since that's what the parameters are really for.

It looks as if Heikki has already changed the page anyway, which
includes and example of a parameter setting for primary_conninfo and
removes links to the libpq connection stuff. Problem solved :)

Thom


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 08:20:26
Message-ID: 3f0b79eb1002250020y81e9f44g54e3021edcaebdc3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
> It looks as if Heikki has already changed the page anyway, which
> includes and example of a parameter setting for primary_conninfo and
> removes links to the libpq connection stuff.  Problem solved :)

Yeah, Heikki removed the link from
http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html#STREAMING-REPLICATION-SETUP

but it still exists in
http://developer.postgresql.org/pgdocs/postgres/standby-settings.html

So I think that we still need to modify the document about
primary_conninfo to suit your need. No?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 09:15:18
Message-ID: 4B863FA6.90706@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

Fujii Masao wrote:
> On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>> It looks as if Heikki has already changed the page anyway, which
>> includes and example of a parameter setting for primary_conninfo and
>> removes links to the libpq connection stuff. Problem solved :)
>
> Yeah, Heikki removed the link from
> http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html#STREAMING-REPLICATION-SETUP
>
> but it still exists in
> http://developer.postgresql.org/pgdocs/postgres/standby-settings.html
>
> So I think that we still need to modify the document about
> primary_conninfo to suit your need. No?

Yeah, it's not very clear as it is.

How about this:

--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -193,7 +193,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f"
"%p"'
<listitem>
<para>
Specifies a connection string to be used for the standby server
- to connect with the primary. This string is in the same format as
+ to connect with the primary. This string is in the format
+ accepted by the libpq <function>PQconnectdb</function> function,
described in <xref linkend="libpq-connect">. If any option is
unspecified in this string, then the corresponding environment
variable (see <xref linkend="libpq-envars">) is checked. If the

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Thom Brown <thombrown(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 09:19:43
Message-ID: bddc86151002250119n7372e967rd7733e6969b74f4f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On 25 February 2010 09:15, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Fujii Masao wrote:
>> On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>>> It looks as if Heikki has already changed the page anyway, which
>>> includes and example of a parameter setting for primary_conninfo and
>>> removes links to the libpq connection stuff.  Problem solved :)
>>
>> Yeah, Heikki removed the link from
>> http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html#STREAMING-REPLICATION-SETUP
>>
>> but it still exists in
>> http://developer.postgresql.org/pgdocs/postgres/standby-settings.html
>>
>> So I think that we still need to modify the document about
>> primary_conninfo to suit your need. No?
>
> Yeah, it's not very clear as it is.
>
> How about this:
>
> --- a/doc/src/sgml/recovery-config.sgml
> +++ b/doc/src/sgml/recovery-config.sgml
> @@ -193,7 +193,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f"
> "%p"'
>         <listitem>
>          <para>
>           Specifies a connection string to be used for the standby server
> -          to connect with the primary. This string is in the same format as
> +          to connect with the primary. This string is in the format
> +          accepted by the libpq <function>PQconnectdb</function> function,
>           described in <xref linkend="libpq-connect">. If any option is
>           unspecified in this string, then the corresponding environment
>           variable (see <xref linkend="libpq-envars">) is checked. If the
>

Yes, that'll do :)

Thanks

Thom


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 09:34:12
Message-ID: 3f0b79eb1002250134g5e186d3dy3025af6fb08377d6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On Thu, Feb 25, 2010 at 6:15 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Yeah, it's not very clear as it is.
>
> How about this:
>
> --- a/doc/src/sgml/recovery-config.sgml
> +++ b/doc/src/sgml/recovery-config.sgml
> @@ -193,7 +193,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f"
> "%p"'
>         <listitem>
>          <para>
>           Specifies a connection string to be used for the standby server
> -          to connect with the primary. This string is in the same format as
> +          to connect with the primary. This string is in the format
> +          accepted by the libpq <function>PQconnectdb</function> function,
>           described in <xref linkend="libpq-connect">. If any option is
>           unspecified in this string, then the corresponding environment
>           variable (see <xref linkend="libpq-envars">) is checked. If the

The following description in the document about PQconnectdb() doesn't fit
primary_conninfo because of restriction of readRecoveryCommandFile().

---------------
To write an empty value, or a value containing spaces,
surround it with single quotes, e.g., keyword = 'a value'. Single quotes
and backslashes within the value must be escaped with a backslash,
i.e., \' and \\.
---------------

So I'd like to copy and paste the description about conninfo except the
above. Thought? Here is the patch.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
primary_conninfo_doc.patch text/x-patch 1.7 KB

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 09:36:05
Message-ID: 4B864485.6010800@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

Thom Brown wrote:
> On 25 February 2010 09:15, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> Fujii Masao wrote:
>>> On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown <thombrown(at)gmail(dot)com> wrote:
>>>> It looks as if Heikki has already changed the page anyway, which
>>>> includes and example of a parameter setting for primary_conninfo and
>>>> removes links to the libpq connection stuff. Problem solved :)
>>> Yeah, Heikki removed the link from
>>> http://developer.postgresql.org/pgdocs/postgres/streaming-replication.html#STREAMING-REPLICATION-SETUP
>>>
>>> but it still exists in
>>> http://developer.postgresql.org/pgdocs/postgres/standby-settings.html
>>>
>>> So I think that we still need to modify the document about
>>> primary_conninfo to suit your need. No?
>> Yeah, it's not very clear as it is.
>>
>> How about this:
>>
>> --- a/doc/src/sgml/recovery-config.sgml
>> +++ b/doc/src/sgml/recovery-config.sgml
>> @@ -193,7 +193,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f"
>> "%p"'
>> <listitem>
>> <para>
>> Specifies a connection string to be used for the standby server
>> - to connect with the primary. This string is in the same format as
>> + to connect with the primary. This string is in the format
>> + accepted by the libpq <function>PQconnectdb</function> function,
>> described in <xref linkend="libpq-connect">. If any option is
>> unspecified in this string, then the corresponding environment
>> variable (see <xref linkend="libpq-envars">) is checked. If the
>>
>
> Yes, that'll do :)

Ok, committed.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 10:41:35
Message-ID: 4B8653DF.3000009@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

Fujii Masao wrote:
> On Thu, Feb 25, 2010 at 6:15 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> Yeah, it's not very clear as it is.
>>
>> How about this:
>>
>> --- a/doc/src/sgml/recovery-config.sgml
>> +++ b/doc/src/sgml/recovery-config.sgml
>> @@ -193,7 +193,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f"
>> "%p"'
>> <listitem>
>> <para>
>> Specifies a connection string to be used for the standby server
>> - to connect with the primary. This string is in the same format as
>> + to connect with the primary. This string is in the format
>> + accepted by the libpq <function>PQconnectdb</function> function,
>> described in <xref linkend="libpq-connect">. If any option is
>> unspecified in this string, then the corresponding environment
>> variable (see <xref linkend="libpq-envars">) is checked. If the
>
> The following description in the document about PQconnectdb() doesn't fit
> primary_conninfo because of restriction of readRecoveryCommandFile().
>
> ---------------
> To write an empty value, or a value containing spaces,
> surround it with single quotes, e.g., keyword = 'a value'. Single quotes
> and backslashes within the value must be escaped with a backslash,
> i.e., \' and \\.
> ---------------

Hmm, so how does one escape quotes in recovery.conf? That would be valid
information, if readRecoveryCommandFile() didn't choke on quotes.

At some point we'll have to make the recovery.conf parsing smarter, if
only for consistency with postgresql.conf, or merge them completely...

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Thom Brown <thombrown(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Confusing link in streaming replication section
Date: 2010-02-25 11:04:03
Message-ID: 3f0b79eb1002250304u5efda406q3f864bf809a2b0a1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On Thu, Feb 25, 2010 at 7:41 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Hmm, so how does one escape quotes in recovery.conf? That would be valid
> information, if readRecoveryCommandFile() didn't choke on quotes.

Probably we can't.

> At some point we'll have to make the recovery.conf parsing smarter, if
> only for consistency with postgresql.conf, or merge them completely...

+10

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center