Confusing link in streaming replication section
Confusing link in streaming replication section
От:
Thom Brown <thombrown@gmail.com>
Дата:
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
Re: Confusing link in streaming replication section
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Thu, Feb 11, 2010 at 7:43 AM, Thom Brown 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
Re: Confusing link in streaming replication section
От:
Thom Brown <thombrown@gmail.com>
Дата:
On 12 February 2010 01:57, Fujii Masao wrote: > On Thu, Feb 11, 2010 at 7:43 AM, Thom Brown 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
Re: Confusing link in streaming replication section
От:
Thom Brown <thombrown@gmail.com>
Дата:
On 12 February 2010 16:15, Thom Brown wrote: > On 12 February 2010 01:57, Fujii Masao wrote: >> On Thu, Feb 11, 2010 at 7:43 AM, Thom Brown 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
Re: Confusing link in streaming replication section
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
Sorry for the delay. On Sat, Feb 13, 2010 at 1:15 AM, Thom Brown 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
Re: Confusing link in streaming replication section
От:
Thom Brown <thombrown@gmail.com>
Дата:
On 25 February 2010 02:45, Fujii Masao wrote: > Sorry for the delay. > > On Sat, Feb 13, 2010 at 1:15 AM, Thom Brown 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
Re: Confusing link in streaming replication section
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown 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
Re: Confusing link in streaming replication section
От:
Thom Brown <thombrown@gmail.com>
Дата:
On 25 February 2010 09:15, Heikki Linnakangas wrote: > Fujii Masao wrote: >> On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown 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"' > > > 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 PQconnectdb function, > described in . If any option is > unspecified in this string, then the corresponding environment > variable (see ) is checked. If the > Yes, that'll do :) Thanks Thom
Re: Confusing link in streaming replication section
On Thu, Feb 25, 2010 at 6:15 PM, Heikki Linnakangas 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"' > > > 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 PQconnectdb function, > described in . If any option is > unspecified in this string, then the corresponding environment > variable (see ) 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
Re: Confusing link in streaming replication section
От:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Дата:
Thom Brown wrote: > On 25 February 2010 09:15, Heikki Linnakangas > wrote: >> Fujii Masao wrote: >>> On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown 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"' >> >> >> 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 PQconnectdb function, >> described in . If any option is >> unspecified in this string, then the corresponding environment >> variable (see ) is checked. If the >> > > Yes, that'll do :) Ok, committed. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
Re: Confusing link in streaming replication section
От:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Дата:
Fujii Masao wrote: > On Thu, Feb 25, 2010 at 6:15 PM, Heikki Linnakangas > 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"' >> >> >> 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 PQconnectdb function, >> described in . If any option is >> unspecified in this string, then the corresponding environment >> variable (see ) 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
Re: Confusing link in streaming replication section
От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Thu, Feb 25, 2010 at 7:41 PM, Heikki Linnakangas 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
Re: Confusing link in streaming replication section
От:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Дата:
Fujii Masao wrote:
> On Thu, Feb 25, 2010 at 5:03 PM, Thom Brown 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"'
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 PQconnectdb function,
described in . If any option is
unspecified in this string, then the corresponding environment
variable (see ) is checked. If the
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com