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.94.2) (envelope-from ) id 1tnvz5-003ouq-4c for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 08:44:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tnvz5-000TwC-D2 for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 08:44:37 +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.94.2) (envelope-from ) id 1tnvz4-000Tw3-HC for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2025 08:44:37 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tnvz1-0008IC-05 for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2025 08:44:36 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id B033C1382794; Fri, 28 Feb 2025 03:44:33 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Fri, 28 Feb 2025 03:44:33 -0500 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=1740732273; x=1740818673; bh=mTBNX0cvNW Dmoqj1iwqRX+8i2OmegFqw7KfEpRI0pcA=; b=KAzYmD/zpQwO0CL052sY+DFlU2 DHrpYRIvkXsu7XS+RwnibVXVgdWxCuK5PLLuEzs0WilHblDC0Fqnye9N96Vv9Eax YLFqZ7454H1c+D6RuvqPLw1cAItXMwMAj+4ZY9QgczyawEnPS7/zmKqGQN71/v/d lQ+nEoiaX9bKjhhb0rod3EmZUKseLkXUt3w6Xooo41nVbmNriYnBYDynMNPDcfIX 5yIBcijKRxutcmzL8VKJASC4TWgNuQPorwjMW2fl0K5FEp4nGR8KAwLWhG210qlr D+LRVKg7CSAoDj4kHNwF8Yr9qZdAMYnswlpmc8K9hSWLcDSWhTmPK84Bqqlg== 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= 1740732273; x=1740818673; bh=mTBNX0cvNWDmoqj1iwqRX+8i2OmegFqw7Kf EpRI0pcA=; b=UDt29rm/uQowq3O8smgji3tN9/sKMFQZIioSKhA+Uc9zNynXTLx fck8pcMt05saegJ4Ol2WwB87qbdUJbFoZsdzNts5UauwTRieuUVG/Lof6oI3lUER 7D/qBgsc/bsBcYy/B8GUw65ryDZuS+9bt6FEwEwE3/9t6ytgbeXd5GRXLGrSZktD B+2M9B9wHrd3No1q83ahxh1jqOVT4+HpGmNdGDQqZOMW5PZ+RemBGBozwLuzAeNV YAZNRnxw32QRDInn4kAKONgEZI6o72Oitey9dgdaqWg+hzTq4GcKUXebH6hevpRJ NDjQ1fdcsqTlbRrCDW9BZYN7MM8EI2prYng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekleelgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecufghrlhcuvffnffculd ejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhep ofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighi iiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeffhfekueevteei gfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhnsggprhgtphht thhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsvghrthhrrghnuggurh houhhvohhtrdhpghesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggt khgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Feb 2025 03:44:31 -0500 (EST) Date: Fri, 28 Feb 2025 17:44:20 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: pgsql-hackers@lists.postgresql.org Subject: Re: [BUG]: the walsender does not update its IO statistics until it exits Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Q4iIfB82r/ZAHzhu" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Q4iIfB82r/ZAHzhu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 28, 2025 at 02:41:34PM +0900, Michael Paquier wrote: > With smaller records, the loop can become hotter, can't it? Also, > there can be a high number of WAL senders on a single node, and I've > heard of some customers with complex logical decoding deployments with > dozens of logical WAL senders. Isn't there a risk of having this code > path become a point of contention? It seems to me that we should > benchmark this change more carefully, perhaps even reduce the > frequency of the report calls. One idea here would be to have on a single host one server with a set of N pg_receivewal processes dumping their WAL segments into a tmpfs, while a single session generates a bunch of records with a minimal size using pg_logical_emit_message(). Monitoring the maximum replication lag with pg_stat_replication and looking at some perf profiles of the cluster should show how these stats reports affect the replication setup efficiency.=20 -- Michael --Q4iIfB82r/ZAHzhu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmfBd2QACgkQnvQgOdby QH2R9Q/9E72vaaFsCUrJ9LC+VMGmSye/ACNPUz4xyt7LihfMLHNcShLxDHofY4fM l2YVgJsrNXH9aX187MDUh31BKiNrYwmC4WKgzuc2x4hcqJBT17mNqQDyu3nWRDfK iyoWGRolkrcTMmOoGAgw4PkcFi+Y49GFVO9LHI9XCUPPuEd5IA2+BDmDPVvhvcAh PQ9EYr4xcOz+4nGy40b5q28rV+xQ+UzaSEqaW1lBVTr7NKiJm50ZFxBRkbnQXJdp 8mDs/8c6IfgWFAROQkORs43z/z0hs4lkCsTTYE+MTvGmR2tjhaU7+UP2ZVpX0qtP vJ6nNbzZGY1LFI2hgurLYxCU5WytzCJGF/RpeKTiXrGeTshq+6dLPcFjU2+7lqLG wUySmM0pmlbel9x0OyQJUb5iVY/xp6lLwi/z7Xh5DmIzYfEP2c+4Z50nSy6WxNba zQu3vyy7sN/GaxkvLR30XRuaULyO9Zes3mnF/e8R0q2Ns9N3sNVO/N38MYbgpTYx uzE3N6+hne7ePC7isFc3V7h+cWXwwFTxa4mDzK35YJ/qD4a80H5UCH7ezbB2Bl1P qHuabxaenTDrqMHozspE8TQxM2KPQzbOtMf5MdDttJ15zH8oiopL/U2R6TfiuPkJ abYhh4ySCZxjZEYn0/QiYKjpdojBCmv+OW4ypJNGW/8zDnMizA8= =2vNi -----END PGP SIGNATURE----- --Q4iIfB82r/ZAHzhu--