Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbBi2-0000sO-HW for pgsql-hackers@arkaria.postgresql.org; Tue, 19 May 2020 23:31:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jbBi1-0007dM-A9 for pgsql-hackers@arkaria.postgresql.org; Tue, 19 May 2020 23:31:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbBi0-0007dF-8W for pgsql-hackers@lists.postgresql.org; Tue, 19 May 2020 23:31:41 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jbBhw-00022s-U9 for pgsql-hackers@lists.postgresql.org; Tue, 19 May 2020 23:31:39 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D2E645C01CA; Tue, 19 May 2020 19:31:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 May 2020 19:31:34 -0400 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=fm1; bh=He0z3GiZOGoPuzabM50P9ciWoiq aRV9KPyphMgFZTzo=; b=PTMpOx/BQNy8e5+KiSHcA6ymrkFWtID5xMRyBrST3p7 4PomTY0EitF2wwoEZBtDJe9YnzqUNY8C3gO1RULgqwCBvRTeoKnVBuov/COPFqfr ufgAKI9sfzCyu0Msuc5sOhpjk/tYQK61q0pOsrZKuKIwWjpgCy2DK5LsB7ZZj7Ne CCMLFrJP386dFLOYFs3m0VLTv1mDZx0thCZVLR5aPE0x+AJp8Fcmt7t0IB/vROb6 DzgQqGXsuFzJEKmBTWRi2UHTlvsBCgH9nCJ/qCqDZIWfhRSMg2j4hrcz0D8Cfucg IKIfa/PYHx+GeGt4/e7tEBjFKJIvVMQP+vlwalAv43g== 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=fm2; bh=He0z3G iZOGoPuzabM50P9ciWoiqaRV9KPyphMgFZTzo=; b=J+WxGTLPftrh4j3/EAENYa MyHXvg3XbcLW7cTY4MDrPQMIvB4+o+/tXZzFgXuO58pHBcHwNiOzNAzz/MUCUUJ3 SP6dScOFBmkolPPERQ0W4lq51Jq0tfsu7dNUgrWprciXM2nG3r6bXnhFP+aAQGAI 4y6JNlDhLtenVQQtAm9qaU9WNSGOhQU+vIhhk+zWp7+mao/9wLzjFzrbzoZwZXfX udgS2u/o9W/nQzkjw9D5Fy5j+SEwMwZD7JW3sPsghrrSwr0sxXuu3sfOj/ufufJT 1XhoQFs71XOcmVjIunVtbqiKEZVhWhTEvgezLqMXfOCP96U4CHnxzV0kQg1AdehA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtkedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id CC3253066433; Tue, 19 May 2020 19:31:32 -0400 (EDT) Date: Wed, 20 May 2020 08:31:29 +0900 From: Michael Paquier To: Fujii Masao Cc: Alvaro Herrera , Postgres hackers , Thomas Munro Subject: Re: pg_stat_wal_receiver and flushedUpto/writtenUpto Message-ID: <20200519233129.GA2355@paquier.xyz> References: <20200515230539.GC212736@paquier.xyz> <20200515233446.GA334@alvherre.pgsql> <20200516011547.GD212736@paquier.xyz> <20200517010857.GI212736@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2020 at 11:38:52PM +0900, Fujii Masao wrote: > I found that "received_lsn" is still used in high-availability.sgml. > We should apply the following change in high-availability? >=20 > - view's received_lsn indicates that WAL is being > + view's flushed_lsn indicates that WAL is being Oops, thanks. Will fix. > BTW, we have pg_last_wal_receive_lsn() that returns the same lsn as > pg_stat_wal_receiver.flushed_lsn. Previously both used the term "receive" > in their names, but currently not. IMO it's better to use the same term in > those names for the consistency, but it's not good idea to rename > pg_last_wal_receive_lsn() to something like pg_last_wal_receive_lsn(). > I have no better idea for now. So I'm ok with the current names. I think you mean renaming pg_last_wal_receive_lsn() to something like pg_last_wal_flushed_lsn(), no? This name may become confusing because we lose the "receive" idea in the function, that we have with the "receiver" part of pg_stat_wal_receiver. Maybe something like that, though that's long: - pg_last_wal_receive_flushed_lsn() - pg_last_wal_receive_written_lsn()=20 Anyway, a rename of this function does not strike me as strongly necessary, as that's less tied with the shared memory structure, and we document that pg_last_wal_receive_lsn() tracks the current LSN received and flushed. I am actually wondering if in the future it may not be better to remove this function, but it has no maintenance cost either so I would just let it as-is. -- Michael --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl7EbFEACgkQnvQgOdby QH2kTA/+Nh5moa9ktFZ4TnsYw6QFOK+CzD3t20vMJNrknbzN/VdKOMYhjCx/xmpn XARyLEXVCvPRQyVIli9pdxA7p1wV4+fyif6gujI2fyDhmy00SyLu2GBaFtTRu825 EKit+bNM3LVlyfcp9dhDpWhnIdbsMpU72Y3t704IOWfg3kUm4OULAGmUIcVsaQxq ChdnIb5oUZ8nu86Jm7Lu3euhiMBhp47uUeXm+RB88M6lXBKmuUTUcXHt49MOmUB5 BnUG61MoH4dXwvPGelAbY2g6btq9rjrXpN4Afu5CHceOJM7irSMVdKZjmWuohHCG vdxuUXqcwsITPdM6efYX6uvtJD1TAztuoA3aOx0Wmmmeseja8Q7/UVqwFAAsOWcA w857IX5OnTdpl54ek8VdezmLOt7k3ahWBvlrTyUq74eG8AhgOyQ1F/PB6FoSGkaZ tGdGLtljBzWjFKVy8+aBIkniWKqlFdXiYvuLwsKdyNqU3yRjMeGJ5q7HNPzft9yd DXHqXSMMdx39fLIpjluaiVe/7V9xF/yLiUAyED6/sqn5hk+HMESMl3BKqI8ZQmvv UZbc2oReDq8djbu+Wyd7hwNxYgeKA5r4rfqHdKTFwpW6QquHIbWMklEM63fBIyI7 5TvTSBpjwelqwgp3MR7qwZLC8o6ZEKM9Xlj2m0PKZW5VvrWpz/4= =2TDe -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--