Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wkt5e-000vZR-1D for pgsql-docs@arkaria.postgresql.org; Sat, 18 Jul 2026 00:39:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wkt5b-002PiG-2I for pgsql-docs@arkaria.postgresql.org; Sat, 18 Jul 2026 00:39:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wkt5b-002Pi7-1X for pgsql-docs@lists.postgresql.org; Sat, 18 Jul 2026 00:39:35 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wkt5Y-00000000kbk-4631 for pgsql-docs@lists.postgresql.org; Sat, 18 Jul 2026 00:39:34 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id A17BA7A00FD; Fri, 17 Jul 2026 20:39:32 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 17 Jul 2026 20:39:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1784335172; x=1784421572; bh=x5RKe8BJXY Iz3kfvtHYj//zV3LnMSwI9dhBoo/zOEww=; b=TtaJPm/ue2cp3EWkv5Tqdzw5S3 I64IMBPm5RodzGg0nNvfZKG76FnBoUAJ7ginRYKm75yAAxkOBg00vLncdcD+NyQ1 rm6QRLBS8wfIS7Uf6+n2tKZGLqUuNVbpWhR5MRnUDpOhLVMQWxk4yuDfmY91iJKz hp+YBBYhWX9GXCOicj9bgB5a+Wzreo8xQnysrMBCHL0MmvH8XK/93G6GA5m1quRj XzUEo4lEyB7KqxGabGyX1LC4E5FJ8/6PX7EgtCE95IUGizjiqQZoPJ0S+v2p9pS+ xau+FrVjWYVSm64UwJTYxxWn5L91hC9UWpC8XzN2sqECcltq5LfIdj4y9u9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784335172; x=1784421572; bh=x5RKe8BJXYIz3kfvtHYj//zV3LnMSwI9dhB oo/zOEww=; b=CwRaYxvvQ1JfuyNfTj7lCSl84P+fjl340QRuoSFhFoHTJWLUOh7 x3x2CspNLYjfRZZSgIlbewZZ7QvqY+yf9DpIUSy7nEK8FMuZKShOn74H7XktIPtb vQJaJsMZ3ZRvW4KuikGyldnmaqi2eNsUFqg2R7pJso5OYAkjt9aBDzNVRV+gwRWT 7GX+8HTUEzjHeo9LJxdM3I1WxfNAGQLfIJqFLSVDQTrbSYhfpiIPGajx+obUEvW9 os/MK/+E+3yFgMV6o1rqdFq/nYPbPR3CLT+Z1d7UOe+cm/WDgP1J/Dyopar8/jy3 KsDrYfonSGo4birw5s3qgyrGYJdCkDeffzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEehdhKxsMEwhbj6sIEAbnBpKsf9imkbFd+SDQUUZhYIMVVMdjwDbNLgxlK8mdGo7 kLp0iFxng10aJAo6fHFR7eMkxm7pVjHG/fBwojWU3kk/FljGVfi0KuXpkKw41dYxSQZdbG A0r0rCOalODpU6KCDUmWJah6jBUnITRWUlBKSCM445C2BpYh/Nly1JFtFeUUn4bhWxCewa iiZTrV45cMGPh87hs7BZDsqcz8VPP0GJXBj4mNBy7+PzN3xpC6Ik1fr3GLByHmI7qyQ6Ac 3EZjQQA6ktTSII2TkTvpGOeziRxxhLzOXeEVDZI+T3VLqdNTuKQ0Lq/9xVkh+l5x/z84Ql r9uBEko1XP+2qGNOVLcF71wxC26x18gDp4D+nzBGj67zQS1so0Y+vDSSPAFfjFn0HCH5hS 95bd9V2FK849iMww1usZ32X68p2GoNcHtEiaZ1BH3DTTf99z/cGAPSOiZ0+8Yx0bnb4kpH n4zBJwx41+D5wPBNK0eWpr/DuX8yPiFA4PwLYDdNGXi6mCMHmJiDIZQGrShSgJu7FX9oqq aJBINQBAHn/8qsIEkvE0mZCYu+5Ur3eRuULyEEYjIMPUQMfwBYU+b1/74wDkw/LVE4bgR8 mKrr5HDR5c32oSvwhLFQW+anALWv6O6t6sWfxx1/0pKloTQRn4ukP+mRGQsQ X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Jul 2026 20:39:30 -0400 (EDT) Date: Sat, 18 Jul 2026 09:39:26 +0900 From: Michael Paquier To: Fujii Masao Cc: "pgsql-docs@lists.postgresql.org" Subject: Re: Improve pg_stat_recovery documentation Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fuBQyWkWBdGzcZ5h" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --fuBQyWkWBdGzcZ5h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 17, 2026 at 11:10:08PM +0900, Fujii Masao wrote: > That behavior seems fine to me, but it isn't documented. So I'd like to p= ropose > the attached patch, which documents that behavior and also makes a few ot= her > documentation improvements: >=20 > - Mention the view in high-availability.sgml as a way to monitor > recovery state and replay progress, alongside the existing recovery > information functions. Why not. > - Clarify that the view returns at most one row, not exactly one row, > and no rows to users who lack the pg_read_all_stats privilege. Yep, that's incorrect. > - Correct the description of last_replayed_end_lsn to clarify that it > is the end LSN of the last replayed record plus one. > - Document that replay_end_tli equals last_replayed_tli when no WAL > record is currently being replayed. Okay. > - Clarify that current_chunk_start_time is NULL until streaming WAL > has been received. Time when the startup process observed that replay had caught up - with the latest received WAL chunk. Used in recovery-conflict - timing and replay/apply-lag diagnostics. NULL if not yet + with the latest WAL chunk received from streaming replication. + Used in recovery-conflict timing and replay/apply-lag diagnostics. + NULL if streaming WAL has not yet been received or the time is not available. [...] - * timestamp of when we started replaying the current chunk of WAL data, - * only relevant for replication or archive recovery + * timestamp of when we caught up with the latest WAL chunk received from + * streaming replication */ True that this does not work under archive recovery, so specifying that only only gets updated due to streaming replication sounds good here. Looks good to me overall after reading the patch, thanks for the suggestions. -- Michael --fuBQyWkWBdGzcZ5h Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpayz4ACgkQnvQgOdby QH15FA/9FA5JCy4qyJrGxVVoQ8MFerWiJVfJg4HTgpZIVp9wL5JZi+NAoiDs1Sy5 V78KZE8VfjDrHihXpVdUzsOkKzrtiqdAcc34TSGAdjdki/hzVObFCXfgSOglBsLk rcMemGl/P8DtZM8aWOQsBdQYyfAE4qZ8libgAAWowXZ+wItn//Q/kSwA0tnP14P+ /baNQoY37I6La/SDFvDPrpLZe1m7VuK08V75AFDPUe8lWxt3NFMTTuPtD9uReZMa 77oM0OmURQAt0OQzlKewqmt2p51tt5YASI+S2vhhMMLkcgvzL1KvW0NPBttKKYWn VLhnVm8msjYpkqD/CWtm7V90Rr+JO3EiQQi5Oq9dTToV7s5CbxbSWejb3Qn4jBN2 eKcbTbDOi89VDt8+Dbau2qRnqDnfxh5Fk0kfu75d/ZHz9lKEVZic8VNlStAQMhCb lZlZurRWsJpbDOJ/FOy6PkygM5SSjKgGvMQ6YJtkgROcC2Gtz9+w5vrrhVD3u+SY q2P+YrbGNhiDsnI0Q0LOosc/Y79mJI8qsim4zAmP+lneCkO134cOR5FCSwlSTP2+ c0/69DgftCsT0e9g0QGt2jCtK/fab7w2lYgleZHZfknVz2Wsq97znvxbtvFFx1WF SxFZcVWUPbTwvd7EyGLNMQIvb0eiMAFCXsX+5qvsFkRxe5+xNGg= =0hKA -----END PGP SIGNATURE----- --fuBQyWkWBdGzcZ5h--