Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eshze-0006df-Gx for pgsql-docs@arkaria.postgresql.org; Mon, 05 Mar 2018 04:44:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eshzc-0007WC-P6 for pgsql-docs@arkaria.postgresql.org; Mon, 05 Mar 2018 04:44:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eshzb-0007W2-Tq for pgsql-docs@lists.postgresql.org; Mon, 05 Mar 2018 04:44:56 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eshzY-0005iC-IR for pgsql-docs@postgresql.org; Mon, 05 Mar 2018 04:44:54 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id DE51BC0C; Sun, 4 Mar 2018 23:44:49 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 04 Mar 2018 23:44:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=q/7ehOSyhKUm03ISe9rHpvYN7Z2ySQg+yP9E7Louglc=; b=JsuxLbus 0K10bFmIvYuWDraBkt3kKEaO/pTh/NxhcUwcPA5UjIX3Jejr4JwUjN32UR7K19OG vXlsouLheWxbNakoybeZuEvOxt+hS6sucloiZoSYlJNtSVVZthEZqavhN5uTEP92 w+TA2E9EKSweUM6SpbDNCVhMHOcSzgKzTebk78uuV8Vzvhcc3jj+mrETkKezbnoi YAaluHbiGuPkYezh/wT5+j9e3RR2zMekY5T9+LOsQhpTZ6LODyA2BA1sUahFfekC /gDAiKtC0HDLR727OE9wZedgBzw1xLbjcs2vOG0ObACaX49MoZDr3XpqEl7Cp+hK 2f/9Wkm+bqrEJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=q/7ehOSyhKUm03ISe9rHpvYN7Z2yS Qg+yP9E7Louglc=; b=j49rdG5KOnjMGYqwKGbyBm5Gf70+XcdWsWietEi1V76mm 1kHj3Nv62wDAKubBYOoZaEVv5sAu0G2koNmk+5riMp5oMNfw6DESJ+pc2H4PxfUC BxCMgphW9COEUJZkrsw0WQ5kOff2c3yk1fLC4BkrojsxTlPI2kZ5+EwFMt2No3uf ubmj42bjHsVk4dUdo/tnXHtLzE4G7O9RqmOY/+eDll4nzukiFmOxOgbVesvMxN/z Qxci3mDNVOQDuOWoTHtvJDQiIUILxyx7fiaAzoJyCKJiSOHHdbSLgGMgsQQVoSJL ZaSSf3qsgGSPUTCIOZzRoL8J42zK6TrgIh5qoGMyg== X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 0F4B724519; Sun, 4 Mar 2018 23:44:46 -0500 (EST) Date: Mon, 5 Mar 2018 13:44:39 +0900 From: Michael Paquier To: Magnus Hagander Cc: Andres Freund , Michael Paquier , Petr Jelinek , =?utf-8?B?xZ5haGFwIEHFn8OnxLE=?= , pgsql-docs , Fujii Masao Subject: Re: libpq options Message-ID: <20180305044439.GA2266@paquier.xyz> References: <20171122132714.1463.27247@wrigleys.postgresql.org> <20180301093554.qrqgdnfwgs77tj23@alap3.anarazel.de> <20180302014938.GC1186@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mxv5cy4qt+RJ9ypb" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --mxv5cy4qt+RJ9ypb Content-Type: multipart/mixed; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 02, 2018 at 12:58:50PM +0100, Magnus Hagander wrote: > To nitpick: >=20 > + protocol. A Boolean value of true tells the > backend >=20 > We don't really have boolean values here, do we? It's just the string true > that's treated as a boolean by the backend. It just sounds really weird to > me when written that way. Particularly since the next sentence talks about > passing "database" as the same thing. >=20 > I know that's pretty much nitpicking, but I want to make sure I haven't > actually missed/forgotten how some part of that one is handled.. Yes, that's indeed a bit inconsistent with the other parameters able to use boolean-like parameters, like sslcompression or sslmode (deprecated in favor requiressl), still those two ones are frontend-only parameters, so they are just able to use "1" or "0". Replication is part of the startup packet which uses parse_bool() so valid values can be true, false, yes, no, on, off, 1 or 0. And it is even possible to use upper-case characters. So why not documenting all that precisely then? > It also talks separately about "going into walsender mode" (=3Dphysical > replication) and "instructs the walsender to connect to the database". I > think that's a bit confusing. I suggest just calling it "physical > replication mode" and "logical replication mode", and not bother mentioni= ng > walsender since that's quite internal. Indeed, this term is pretty spread across the documentation as well. I have taken into account this feedback, and created the new version attached, for a v2. Thoughts? -- Michael --wRRV7LY7NUeQGEoC Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="replication-param-doc-v2.patch" Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 2a8e1f2e07..8934559239 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1262,6 +1262,57 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname =20 + + replication + + + This option determines if a backend should use the replication + protocol. For a detailed description about the replication protoco= l, + consult . The following val= ues, + which are case-insensitive, are supported: + + + + true, on, + yes or 1 + + + + The backend goes into physical replication mode, wherein a small + set of replication commands can be issued instead of SQL statem= ents. + Only the simple query protocol can be used in this case. + + + + + + database + + + The backend goes into logical replication mode, as the value + instructs the backend to connect to the database specified in + the dbname parameter. Only the simple query + protocol can be used in this case. + + + + + + + false, off, + no or 0 + + + + The backend is a regular one, which is the default behavior. + + + + + + + + sslmode diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 3cec9e0b0c..2e231efac0 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -1635,15 +1635,9 @@ that cannot support tls-unique fo= r some reason. =20 To initiate streaming replication, the frontend sends the -replication parameter in the startup message. A Boolean= value -of true tells the backend to go into walsender mode, wh= erein a -small set of replication commands can be issued instead of SQL statements.= Only -the simple query protocol can be used in walsender mode. -Replication commands are logged in the server log when + connection parameter in the +startup message. Replication commands are logged in the server log when is enabled. -Passing database as the value instructs walsender to co= nnect to -the database specified in the dbname parameter, which w= ill allow -the connection to be used for logical replication from that database. For the purpose of testing replication commands, you can make a replicati= on --wRRV7LY7NUeQGEoC-- --mxv5cy4qt+RJ9ypb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlqcyzcACgkQnvQgOdby QH25NA//eZd9iKDpQjNgBMxgzQ7Wx6Ilt8f+h7fCQ9MsT2HNTRKFbxT1w+64Yphr uxGElNV4kuNZaM5REATcfFNC5G+BbMMiH1EoZ+qVuzpVUOVZzIKTqUD6fpWp1pwQ A7hCo/MdI+pFp5W4WJ/XJk3ehBr/zuxEEXvKHmBTQBKn9UWLDbRs8unJjyu11DrL 6eaJ/8CjkJaXH0N4FzlvgXt1tq5V83w8frcKAGy/U48vOcWonzt/eLhdKf8lHje8 XdHL2mc1LJr7LIDCtf/3rguXjggyDWOZZ3iW5lbOQKAuVDcqkdzF/66vexNgo5eR KPQOYvJVoelZHz3j6LDlFnXsqIM0hfEao3t42SOhMpn/FXL+OzMH6MsJ5LHFkZiC NndT/xC9mkfIJLyT/cq6brU3oOy6FLjIlfDqnPrgqZWvu/9uGJgt5Br5m1bJhJQK 0STmbKECf4gS0d5Sqd2myrUsxKaKUkpgFfaXaGO3+03uSFPSYk0uLfYIc7RsO/VY DeXpIoHC8ZWXvsonotkjFoPVpGkyhkCbAHskUe7v2DNwFWmH4CHRus07EuN83uZb GdEOZxoi9TiI6ZBsrXxhkZi2ABZTt9ahHF2b9JIwmZ/zpHL1uyUx/CZxut33scyT P1TueJ16DZL6bbl+Ce5aRRU+t5GrmEuNDDWTu5qDwyHnrJfG0ps= =dK1s -----END PGP SIGNATURE----- --mxv5cy4qt+RJ9ypb--