Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWXIw-0004BQ-Tb for pgsql-general@arkaria.postgresql.org; Tue, 11 Dec 2018 01:57:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gWXIv-00060o-Gj for pgsql-general@arkaria.postgresql.org; Tue, 11 Dec 2018 01:57:45 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWXIv-00060h-8g for pgsql-general@lists.postgresql.org; Tue, 11 Dec 2018 01:57:45 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWXIs-0002nn-LR for pgsql-general@postgresql.org; Tue, 11 Dec 2018 01:57:44 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5C9D11298; Mon, 10 Dec 2018 20:57:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 10 Dec 2018 20:57:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=xU3tHgJzEzCVnRYJZiSgr5l4nGm QqM6EtOhnafbw7X4=; b=OquQyECKHSpmwRvrfcVrcgQXfn1Wk2oHCoyIYBJacvj M4XwJELtvq0tpGZZqr0OkSHgFQQ5a0EHgac+pZclDBWY3VyHCD+JDUEkgggGUi2g kvWA3s0RqwLmbYIb8BO+5o1BnEhoDfusvrwpZyZC1APESavo1oMMyBTT13IAWXxO ak+JUJgGLgkMhdlll5mS0uEDrG950wmOig8QIoHL6E/PwcsC3+qahbgNsAcF/nJl 2RFyeUCKDEIKpdDoD2JpkvJE+2bxLD5U1WsjG34YmZ4Y2jSRrsoyrLZD4ZrklvQ5 92FefoFSodwntNaHuzxCsksFuR+HAV8IXUq52L+1AoQ== 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-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=xU3tHg JzEzCVnRYJZiSgr5l4nGmQqM6EtOhnafbw7X4=; b=hOT/3VeHllaswkMn6dzLJL lwp32X+nh3oJ18kGzI+2EKlepHI3VXOu9lJ4b/UEp+selcKmZSz7V6LQI7SbbCUQ JecDFREFMroKbVzByoqvLgpp8is/JlphHb5hweexnheY/FpvVRn/RvHY3BcBlMb6 ukJ3mWHwaYvTUuYzEY7VRrTUGoqZm6XVvz6Lmr0s1ObTWfPoW2tHYa16CcPLbdrI W9QcO4XDhoFV7jSoQueTDhLpNjMxCanrWHM0QrYJEBwsX67NsWW5DVbuab0b1ZNG KJkDH9qHkZrDMHnl7duRwHZ7odjQ4HpiY6YjFoQS/YvgAv+yMQNACOWq5JnM0W+A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudegiedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeduudekrddvgedurddvhedurddvtdejnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1fbcf.ap.nuro.jp [118.241.251.207]) by mail.messagingengine.com (Postfix) with ESMTPA id 50669E462B; Mon, 10 Dec 2018 20:57:36 -0500 (EST) Date: Tue, 11 Dec 2018 10:57:33 +0900 From: Michael Paquier To: Jeff Janes Cc: Postgres General Subject: Re: pg_stat_replication view Message-ID: <20181211015733.GD1473@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="M38YqGLZlgb6RLPS" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --M38YqGLZlgb6RLPS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 10, 2018 at 02:24:43PM -0500, Jeff Janes wrote: > What does this mean? Is the standby "caught up" when it replays the LSN > which was current on the master as-of the time that the standby initiated > this connection? Or is it caught up when the master receives at least one > notification that a certain LSN was replayed on the replica, and verifies > that no new WAL has been generated after that certain LSN was generated? > Neither of those things? The WAL sender would switch from catchup to streaming mode when it sees that there is no more data to send to the standby. Please look for the call of WalSndSetState(WALSNDSTATE_STREAMING) in walsender.c. > If a replica has caught up and then fallen behind again, is that different > from a user/dba perspective than if it never caught up in the first > place? Not really, because it means that it has been able to catch up with the latest LSN of the primary at least once. Perhaps you have suggestions to improve the documentation? -- Michael --M38YqGLZlgb6RLPS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlwPGY0ACgkQnvQgOdby QH30Xg//X2pAG//hBnavQlD6/YpTUyZhsR3snMs9zlgl/Faes8wHH2dubpL6KWv7 ralxot2hjeOR5Zd8pIRJbK/LkUtEM9GWU1uvi/Z4ucsW5YBakrtFxpiJXO69ODMB Mjo7umT+rQ0fx5h8E5NSKaYK17J665fQnBGOoI6jLshJM8nP52iiDfbphCKLilOh Ugy8rCr1NchTZqFuSr7kentm1TuIRq911A1VCFoT8EJ8OLbHzta+7MS7t6NlPn3p GnaTs00TiRNlyHhjO3AMfx4+tR0GS75dUwt7NVaUoXovj1drZWvRxaoajMuyLUbh yRWBfNSjJ6VKGTfCQGil9fdbk1QoD7PJ+Jml4A9lJh/Hg7PzSBg2tA5RQMN1hKht PSxK7i48ib4SqaOVsH7u5sHS7PD4kvodtJU8Fs3mPu9svS8tb/gpegfdahjvjRRj xjcAzpZlBCFobAK7isSLmjQV4NZiHrPsVsIigDzQioJ4cZc7K8QAeGpuvLXo1fyg YySbZ8jWX0vPhAcqBrb8WCzI50ZiZXRvG8k4PgdzqUyJD38wQDGrB3ju967s3OvS fkvwaETH+youBlGHiJR1lzC2qQ8htMMzMHl+okswBElBg853UkBL4kBGWthxcjf1 ToNQDb0Q52mA4NFjvk4bUCtQ381bvsnHh77YrgsSK9gGbmk3DBI= =t9Cm -----END PGP SIGNATURE----- --M38YqGLZlgb6RLPS--