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 1w5I95-0036Et-2Z for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 06:55:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5I94-00CUdh-14 for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 06:55:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w5I93-00CUdZ-30 for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 06:55:14 +0000 Received: from fhigh-b8-smtp.messagingengine.com ([202.12.124.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5I91-000000011PE-20dd for pgsql-hackers@postgresql.org; Wed, 25 Mar 2026 06:55:14 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id C4F217A01B1; Wed, 25 Mar 2026 02:55:09 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 25 Mar 2026 02:55:10 -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=fm1; t=1774421709; x=1774508109; bh=JbTgGpq1bM Ckaqg1k5p9IAOb5eXMl1olD0O5QsFgbk0=; b=2w30GzLfzzDiYJ0nX6DjFPCXcF E12LD6CGdWihljuyIFxA8YoY7LNAj1fDpEPAYUEOUiw4AVZO5c0kT68igGNQetjz Ef+qFv75Y36U/ytFRuJoqkCgg9oXDRDCnYqLb8npBgxcr0CjuML87wz2zgbfh6wT 1A1n9MHjK31PIFKrTEIL7GYgmXPiK9iZecxyENYrAf+UyESzmn0irO0hU3XMVPdT j4LqCxI+5Z9N1zuYL/hyXvgu/EN8tRmLG/t7O33Es3bzqaeLU84ijPgfh5FN+ZLd gb3D+8MlUk9s98B3edKn0NMRuAtMW0ALb8mBYbGkkdPjqh0f8Mtaxjzi4MXA== 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=fm1; t= 1774421709; x=1774508109; bh=JbTgGpq1bMCkaqg1k5p9IAOb5eXMl1olD0O 5QsFgbk0=; b=HGKVSpzXj4nZgbLX24j1amUUpu/skBW8InW4ex0SiqeR45GX4b7 oIMmYMfPT6MOO1ONrcNk/us626h2RDCQMkdM9k1LZDy6c2UKaTf7Dw3gWoGctJKo VuMzp5/l8Tma1gQW4T7ljL75PrAb2eWlg+UQKfAdEvFSgXz8Z84uL/AxdSEgbyRm VB+QAJDwPWtjtJNK+u86F4pKS6fnYupendyGc4a8oIMvYejbT1ZGl9uCxiM0f49n 7NAinAtHmGly1qprZ9CJ+iv1xMLcyWS2l4PSmjjWDfyTBd942IxK64Os4ycE39h3 ndRDJS5YZbGtNc799XeXUJgGH3A6fY6j/rw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdefjeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghshh hurdgtohgvkhekkeesghhmrghilhdrtghomhdprhgtphhtthhopegrshhhuhhtohhshhdr sggrphgrthdrohhsshesghhmrghilhdrtghomhdprhgtphhtthhopegrmhhithdrkhgrph hilhgrudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohepsggvrhhtrhgrnhguughrohhu vhhothdrphhgsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghnughrvghssegrnhgrrh griigvlhdruggvpdhrtghpthhtohepshhhvhgvthgrrdhmrghlihhksehgmhgrihhlrdgt ohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrd horhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Mar 2026 02:55:07 -0400 (EDT) Date: Wed, 25 Mar 2026 15:55:03 +0900 From: Michael Paquier To: Ashutosh Sharma Cc: Ashutosh Bapat , Amit Kapila , Bertrand Drouvot , Andres Freund , shveta malik , pgsql-hackers Subject: Re: Report bytes and transactions actually sent downtream Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U7vrKapDTg3980j+" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --U7vrKapDTg3980j+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 18, 2026 at 09:58:58AM +0530, Ashutosh Sharma wrote: > So the right boundary for sent_bytes is according to me would be: >=20 > a) include logical decoding payload sent downstream (or via SQL > decoding path), whether it came from transactional changes or > non-transactional logical messages > b) exclude auxiliary replication protocol traffic such as keepalives >=20 > If this makes sense then the revised documentation shared by Ashutosh > Bapat in his last email looks good to me, which is: >=20 > Amount of transaction changes and non-transactional messages sent > downstream in the output plugin > format for this slot. The output plugin may filter the changes it > receives. Hence the amount of data that it converts to the output > plugin format is less than the total_bytes. > But the format of data before and after the conversion is different. > Hence the value of sent_bytes is not > directly related to the value of > total_bytes. >=20 > If you all agree with this, I will first prepare a patch to fix the > missing part in #2 which is about reporting stats for > non-transactional messages that goes via logical decoding process and > then on top of that share the ongoing 0001 patch with above doc > change. Amit Kapila and I have both mentioned that the definition you are putting behind the sent_bytes field, as in "not accounting for the protocol messages required in the publisher-subscriber exchange" mentioned in b), feels strange, because these messages are sent over the wire and part of the exchanges, like the decoded data. This could be relevant if the exchanges consist of short decoded data and mostly of protocol data. Of course you are free to send an updated patch based on the definition you see fit. Whether one agrees or not with the definition implemented in the patch is a different matter. Anybody is also free to disagree or overwrite our opinions on the matter, of course, that's how consensus is driven. -- Michael --U7vrKapDTg3980j+ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnDhscACgkQnvQgOdby QH0Qug/8CN3FF7/qsYRz4T8S9gLUF3i0hUbZulLj2h2KnEvYc54Hgov12l+76D0M HjHFe+DifJfkOrl9nz2NXKT0dJ0SMiFYHCdxf43MQ6WG8hQSQDot2Rhj+WbRBKsi wc/C+tOtJh4Q9efUqpyzE9/EUVXdpRiK8IcfND2xtojnHhV7r4mkYy65vcRpd1p1 0Yix3WYWrTLPcle63Gn1IOLRHuwiLjt7onOuY4YzaGpkitXsgmHfQ1egKYCJEQlr K4n3KM8+OgCEw9QwSMuJAO3A3xulqj5iRfAOPYRhMzcTtatw6b1UMZVUMj5LiDFQ qe2Tm5kOJbxp+zRchsai9p7s/oyIxTLGCaU9cT025qYmUmEcjiJLVJyTQHMVhtWl qDgUd+xnrItob45krRqPrCFNfvv9agmmkNyoO0Q1qmnpPlfjt8YMNgM+9Ea5N58l dX5b0kFh28qchHExauuspQ++P4DoojqCXw7tjpE90t2Lf7qOZ8Jt27HPxSxFd0HB hdkZB7FA9638jntG3O5VDIwgvK89tIRocMUBJEOR+opktFwdHa1mYL5Yf1krQB5L /nN+2FXFpeWQSCPqTuHJMuJzwNVp9d5PxJvVe08rPh5cyCL/cW9DrmZ0zRvZ9SYW zbz7y9kiiNn7iXwHF5hoFzsVe7Rdq6hk8jnidTPsNIGekNKGT98= =16pi -----END PGP SIGNATURE----- --U7vrKapDTg3980j+--