Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcLOl-0006Il-Cg for pgsql-general@arkaria.postgresql.org; Mon, 09 Jul 2018 01:55:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fcLOj-0004Cl-6Z for pgsql-general@arkaria.postgresql.org; Mon, 09 Jul 2018 01:55:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcLOi-0004Ce-VO for pgsql-general@lists.postgresql.org; Mon, 09 Jul 2018 01:55:29 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fcLOg-00045t-8E for pgsql-general@postgresql.org; Mon, 09 Jul 2018 01:55:28 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1F1D2373; Sun, 8 Jul 2018 21:55:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 08 Jul 2018 21:55:24 -0400 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= fm2; bh=Kj5E3NDKb6rZ7BPDB+iCRNhItrGFyrxfvYyIw91vB5s=; b=mufcn0jB cda8qzNLrIc/QdYp+csOYBtbxV3Mq41PZgchmy7kLMzX/m81W6WpPtbZOYjeCPmk 8dGMSdVoVGHZh8h7y5lMvE93EBE1wgbVxzu3fYmqy901B1B0JHFJbYXJl1bQt4UR 4Bxdr4uFbnrWEkR4hAuP2P61SwRIq4jBlrYhNiWL9nnkAylxAQBsjqyzXUCtAiaQ vB3XnCgzs77Ssh428N/LQLOZ/aJj7rBzMGTdYtGb9svgJfH3l2vODyNG8aMPuIR9 8Wucgoie75Nv+rbr2z5RrnZkzOe8i/46N+XEMwDXfOjuFHpxrAG6fyJqFUyNhM6M 5Lf54uTNILPZMg== 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=fm3; bh=Kj5E3NDKb6rZ7BPDB+iCRNhItrGFy rxfvYyIw91vB5s=; b=jwJ9JZxUl+CcSqLOiFxBebH3+jCjQ9L+K0dUV+t/lnrJr rMPHhyE2m+VlGJDAp+GBbGHDPgJdJLrImJJr2MMyUX2lU0UXHxh5xU+4U2N5hRsb e2J4oGZCulqRxfgmP0EsCI0fr7YClE/DvNU+SXyp8CHr2ZnKcMg8MNdKFr19bQt7 HJUQmW+rrr5+bOIhAaDKyB1NqiG0fX6yuGeQ9w73rbxWceMO2G61wTvQRDqug3av PPZnm3sWt+7Nnj/sW6aauAan2PSwVJ+n7GuBkLypi8XfP5ZB81BoXIlI/8qWAFkV 4Chngl+MXsXpxcwySONwDVIFLzS5PBt+l6f5+7p+w== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D6751025C; Sun, 8 Jul 2018 21:55:22 -0400 (EDT) Date: Mon, 9 Jul 2018 10:55:19 +0900 From: Michael Paquier To: Matt Dee Cc: pgsql-general@postgresql.org Subject: Re: Specifying WAL Location in Streaming Replication Message-ID: <20180709015519.GI1467@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gTY1JhLGodeuSBqf" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --gTY1JhLGodeuSBqf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 08, 2018 at 09:51:47AM -0400, Matt Dee wrote: > In the documentation for START_REPLICATION, a required argument is the WAL > location to begin streaming at, and I'm not sure what to use here. I have > been using 0, and it seems to work fine. Additionally, it seems that when > --startpos is not provided to pg_recvlogical, it defaults to just sending= a > wal location of 0. >=20 > While this seems to work, I feel a bit uneasy about it since I can't find > any documentation explaining why this works or what this argument does wh= en > using a replication slot. Any clarification would be appreciated. 0/0 can be used in the case where the client does not know which position it should try to use, in which case the server will choose by itself from the oldest LSN position where changes have been left unconsumed. If you have an idea of documentation improvement, I think that it would be welcome, say in the replication protocol page for the command START_REPLICATION. This level of details is really internal, but fresh ideas may bring more clarity in this area, and nowhere in the docs are used references to either 0/0 or InvalidXLogRecPtr for WAL positions. -- Michael --gTY1JhLGodeuSBqf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAltCwIcACgkQnvQgOdby QH0L+A//XMtXdOx/R/AM+wQ4OCn0VNMTiZ6Z17xgR/DlzI/yJAEr48lDX+rzW0ka IqSWNfd9Ab+Eq5RyY9C5EbwGwkY2Y+lHEJDy/1C2zndztfPID2pDD6reMgkKsFYM hw1ln3itmG0Ee2+5PmZEFAaGLBSB3aZKZG7m/fGiHxW4KaXSuJADcYVj562Dkwxn yWP/grJW5vg9uZ8dtxzOAm9GEYl63rilIKJF7O0srUdN6zwHSOi/AXY7crBfG7Mz kTOZa3D0Qx3f1ne2jF3ltYReG8jilSnY1VRh45eykMUUbmM9m0q3px67dVfqrqM+ nIgjf5uvOs/LQXDl/G27spGyEPMv992cm68umtWBV4juwdBpqCYmrf+h7j8x6j9y 2tOVcQvsbZMKPutM8C8dQCHtluCHpqBpK7ezfYxhU9JtZ4SHMeRY6wlT5rvPawj/ WspOI82bau7dQbdOmuznv5ferWRZKeSuJhXzybFSQaTt6UVCrvlNWadyxrvErOvG TfkKTytdhUL0AxpQo65+tuxAuBwD9rLx0tOy3f38vJQ8w1VGnSdz4hYkz0jN1qRT tlW2AfgWJMJXSgDbyqE+AhpAWAWy+gv/pQg+RWXUTmcyBlNthe672iTo2a17xUvC fwaPAor34N1KPT5Bsu//3GG5MrEqWX6SaO/deZxRUMR/LVpOWp0= =MbLc -----END PGP SIGNATURE----- --gTY1JhLGodeuSBqf--