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 1l3Fxe-0001I5-6m for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Jan 2021 10:16:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l3Fxc-0007pr-1i for pgsql-hackers@arkaria.postgresql.org; Sat, 23 Jan 2021 10:16:04 +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 1l3Fxa-0007pi-Ip for pgsql-hackers@lists.postgresql.org; Sat, 23 Jan 2021 10:16:03 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3FxW-00015K-8h for pgsql-hackers@postgresql.org; Sat, 23 Jan 2021 10:16:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8BC655C00B3; Sat, 23 Jan 2021 05:15:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 23 Jan 2021 05:15:46 -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=M8VaYPBWuOXdW8reemNdH0RDq8k DhGgDm6MYV7oum6E=; b=PQ1/HaXlST+8WwO9Ui6x54kFOktDn0lD0Nmk0j8G0xb QX0EaaND4m+usSZtyea36xXsw+ijd3T+KsZRHvLy1VroCod2ZI8N9oRX91ykxgeJ M0mdExqp9Jg8d6mxgPfQg1kCNaAOdUk4G5tJPMQC3iqFXrp3NAknufvc/rzG3hFd Z0lp+S3F1AUIcjUy/Pf2lamXIVGltTX77JfGtXFkfWw1uAEiuJZpOabARd1rmp74 H1QG5qtELSMIGbB4ONxdzLg2jYthaK/ZDceXHTmdHjb0bjN+ERhn7kaRvsDRF0kb 6yOBJcQGLO1RiiAkQLi2xKoL4MX3BubUtEOItfeNoYQ== 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=M8VaYP BWuOXdW8reemNdH0RDq8kDhGgDm6MYV7oum6E=; b=nT858E1LSWs4pbSnJ5BkU6 ku8wzAm/UvNkGxPpl9O692eJeGSrBalj+M7dyGMaoQCQ/SCdWDLSfH/h9OXbBNUH noOFF475q0Fk6RRAcS5P2darbXrG1IXxyulodYPQw7ZcSP8vTMb9FWu/8+jifd4W 76pvdsOrpE7etW+XXYc7J4eUCyvRLk4HThbAE/+NgFwUH2N13G+7xgQhURp90t9m 9xfCUkF9cKLgxqt9k1hmlB1rPM6nNb3g2cRn59YthpUahBrP5+S6qzWmgzXlJls1 o8ELqK+oxjfLSVlIl672RywgSWj7vi3oV8oW+tThly/S0mSuX0ayp5lUnP6YMHwg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudekgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrddukedtrd dukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihii 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 A1F5824005D; Sat, 23 Jan 2021 05:15:44 -0500 (EST) Date: Sat, 23 Jan 2021 19:15:40 +0900 From: Michael Paquier To: Justin Pryzby Cc: pgsql-hackers@postgresql.org, Bruce Momjian , Thomas Munro Subject: Re: doc review for v14 Message-ID: References: <20201222041153.GK30237@telsasoft.com> <20201227202604.GC26311@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AKb2K7BD83NsRGMA" Content-Disposition: inline In-Reply-To: <20201227202604.GC26311@telsasoft.com> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --AKb2K7BD83NsRGMA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Justin, On Sun, Dec 27, 2020 at 02:26:05PM -0600, Justin Pryzby wrote: > Thank you. I have been looking at 0005, the patch dealing with the docs of the replication stats, and have some comments. Number of times transactions were spilled to disk while decoding changes - from WAL for this slot. Transactions may get spilled repeatedly, and - this counter gets incremented on every such invocation. + from WAL for this slot. A given transaction may be spilled multiple times, and + this counter is incremented each time. The original can be a bit hard to read, and I don't think that the new formulation is an improvement. I actually find confusing that this mixes in the same sentence that a transaction can be spilled multiple times and increment this counter each time. What about splitting that into two sentences? Here is an idea: "This counter is incremented each time a transaction is spilled. The same transaction may be spilled multiple times." - Number of transactions spilled to disk after the memory used by - logical decoding of changes from WAL for this slot exceeds + Number of transactions spilled to disk because the memory used by + logical decoding of changes from WAL for this slot exceeded What does "logical decoding of changes from WAL" mean? Here is an idea to clarify all that: "Number of transactions spilled to disk once the memory used by logical decoding to decode changes from WAL has exceeded logical_decoding_work_mem." Number of in-progress transactions streamed to the decoding output plugin - after the memory used by logical decoding of changes from WAL for this - slot exceeds logical_decoding_work_mem. Streaming only + because the memory used by logical decoding of changes from WAL for this + slot exceeded logical_decoding_work_mem. Streaming only works with toplevel transactions (subtransactions can't be streamed - independently), so the counter does not get incremented for subtransactions+ independently), so the counter is not incremented for subtransactions. I have the same issue here with "by logical decoding of changes from WAL". I'd say "after the memory used by logical decoding to decode changes from WAL for this slot has exceeded logical_decoding_work_mem". output plugin while decoding changes from WAL for this slot. Transactions - may get streamed repeatedly, and this counter gets incremented on every - such invocation. + may be streamed multiple times, and this counter is incremented each time. I would split this stuff into two sentences: "This counter is incremented each time a transaction is streamed. The same transaction may be streamed multiple times. Resets statistics to zero for a single replication slot, or for all - replication slots in the cluster. The argument can be either the name - of the slot to reset the stats or NULL. If the argument is NULL, all - counters shown in the pg_stat_replication_slots - view for all replication slots are reset. + replication slots in the cluster. The argument can be either NULL or the name + of a slot for which stats are to be reset. If the argument is NULL, all + counters in the pg_stat_replication_slots + view are reset for all replication slots. Here also, I find rather confusing that this paragraph tells multiple times that NULL resets the stats for all the replication slots. NULL should use a markup, and it is cleaner to use "statistics" rather than "stats" IMO. So I guess we could simplify things as follows: "Resets statistics of the replication slot defined by the argument. If the argument is NULL, resets statistics for all the replication slots." -- Michael --AKb2K7BD83NsRGMA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmAL90wACgkQnvQgOdby QH1OrxAAlbacnemrqmEpyVgWmZ70jZlHSOQPTbaC6dAz662LOyKGYtoB8vFrvpEP lC8kE5hg0HqO34K/i+DNT97MZMCswKbfCehej1T7/eZvGbnnX0NQcvt9KcbtaN9f g8LVuA2/iYnLvMsRyRPxIu/Ocned2P9ovNWdVD4SIeNWGrRYobC9T6bfkkvgQwmM 2rnhtuvZwV/axUoCIdvInYywe4srqbBklVf0za49EgL6ThtlGqQpUL5cWwrpV8gn 8uVk0X3IQisI471d/04v+YedNd8+McdOoGtKyzc810RWBgv0rOgd3Gb2sDHDmOgm yh4TvPAORG5LhQEP3Ei4kuxCdM1JeNcv5TLuz5cTTpx2yzGBs5/XZryFMCgJfFv6 +Uo+ldF8EYt0HDv/4mPdZweVC3nZHRsFjSe6SirR9inwfJQMp6RBrFY4eflZlEa0 5TuDAKG+iwCzz77/4cz51J7YGBQpIZYTFXhmtawI52pD5VoYE+0OAE70KlKGLcv2 GcWen8qgwV9o9er7Ezl8PMNtLVUpSLh2DCbpEAp1n+YwenD/nkuwqe54BWGK/FgQ T+l0QvHYg/mFmHIWQ+cXPaatdiNZ1lV1OUal0jsTvcLpraGDAWqsTWj9K1n1n9Xi ounhO6DyV8K0tTK5QIoAqXhLHBehY0BLOUgf01rcNd3YIcYW3cc= =/cAF -----END PGP SIGNATURE----- --AKb2K7BD83NsRGMA--