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 1vkz9K-005O59-1P for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 06:35:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkz9J-0009aM-0e for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jan 2026 06:35:33 +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 1vkz9I-0009aB-0p for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 06:35:33 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vkz9F-00000000pnF-3xy6 for pgsql-hackers@lists.postgresql.org; Wed, 28 Jan 2026 06:35:32 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 05489EC013B; Wed, 28 Jan 2026 01:35:28 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Wed, 28 Jan 2026 01:35:28 -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=fm2; t=1769582128; x=1769668528; bh=LiR762IsAE 8hH22FY7RxFratgs3Wt3NtSPlGCQ7xnzs=; b=VKaRhmTxDI7kfTWLHutUHB1VVY jIPQrSC0M229CbG0ps2lkaIl2A/fwtaCj+hkw3CIT7CSeavvkNJHyRfhmGYnOdBJ 6EnTFTndOQYPhOlvUxW5sphh/OnuB6CovcDvBUNS97IPU0+IrxTTPhKUPiOUexU9 TZ4C+mvZzaXSjFzY0HwJLIQCEiZl50/EQlCKI6Fj8HI6DeS/9moko/N7c5Z4qI5J xJDhD+N5j++YGgYCUfVYZSiTu/D0z6rS/8nhkcbSLgf1eBRnwqUiGpraO9LnCFOB 1jx0CW/s5fHzwlZseMvNv3w+qKif6ak58DorAolNUX3zAaLI3ia39+KXhImQ== 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=fm3; t= 1769582128; x=1769668528; bh=LiR762IsAE8hH22FY7RxFratgs3Wt3NtSPl GCQ7xnzs=; b=K2sKk5ypQX4kipMTcZpRS9ujezydi1qdUSKGA/d50hO9nGGQA8n ZBleCQ0bl6F35SsWe0slm9s+hp/bKh41DHm1nIL6McqvDYiWI34znABM/QoXSQR5 wiCw2Pa5lYh7DHC5Gi21IAkYrhYXwWSh0EfHTpr9KUK92Soz3iU5ndV8/0fSmK+5 IN1214L9crGUr0LEdJ/R6TrDT12B9BLEENEKhU1g5tbZZ3fwby6ByXNsoPwIJt+D I72wtsS0Std0QtNL0fuEHKcNM4r09NNAXeb+sL6tt5JN5hbW0xYuIPUEJXDUR8+U 9JPydPolgqEpr1iZmGZEhlLe81nswSIxyAw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduiedvieeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsggvrh htrhgrnhguughrohhuvhhothdrphhgsehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhgr shgrohdrfhhujhhiihesghhmrghilhdrtghomhdprhgtphhtthhopehsrghmihhmshgvih hhsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhi shhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepiihsohhlthdrphgrrh hrrghgihesphgvrhgtohhnrgdrtghomh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 28 Jan 2026 01:35:25 -0500 (EST) Date: Wed, 28 Jan 2026 15:35:21 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: Fujii Masao , Sami Imseih , pgsql-hackers@lists.postgresql.org, Zsolt Parragi Subject: Re: Flush some statistics within running transactions Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gpZddzprOttsUEpV" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --gpZddzprOttsUEpV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2026 at 06:59:28AM +0000, Bertrand Drouvot wrote: > The attached, to apply on top of 0001, fix the issue. However it handles = only the > WaitLatch in ProcSleep() case and I start to have concern about the other= s WaitLatch() > that would/could be "woken up" every 1s. Hmm, I indeed suspect that is may not be the only one.. This is much bigge= r. > Using disable_timeout() and enable_timeout_after() in WaitEventSetWait() = does not > look like a great answer to this concern, so I wonder if we should use a = larger > flush frequency instead (as proposed up-thread), thoughts?=20 Only a larger frequency is not the correct answer here. It would just reduce the frequency of the extra lock wait messages for one: these should never appear more than necessary. And how about for example extension code? -- Michael --gpZddzprOttsUEpV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAml5rikACgkQnvQgOdby QH0/rQ//eLio3uuAATMoqBa3VqPDr/0oc1v0zGYlYaT51a+eZuUQwUCGoexONGn9 0aAN23XuyqBZm1MdgWP51hyElBsprNFwjmMIIjkdIADRzrPYdO+oMpEJdEHuoFui 7ZLNc+i3MAvMEEj/faTPP0aFzne/Pke9mhJZBXVGXJfbUmoxbZFQOsBUSX2bkadW 6Mc9Vlh2BSYEqXyBY+RCwcWdyp9v8TM2u73tSBoOv4VrA0NTcPr/VcVWTJ/99q5I 8+wNGG15FsGz5Kb+u58pk7WgOlJzy0CNMDrRsWgZkuPoKdAJwGwdq2BBhbUWCwQg eM3Gt6BUlI/IxCOCQgLPGTkgAxLSpUFD+RDNXijNeohuyGlYg5AKFkn6C4oYERs6 vk2S+IBzkZwJZ1211jx/sAw8HPafJZ+reQ+rfkgGH5O2TN6kNL6Um8//+pXTgR+1 h2E3gVww6jrU7yGV6A36ASbs5dZldGVKjmo8k7VV0vyh2cZLmKv4LFwS44FjiTco 8JRE4yr0YCLqyYZ4QYNJErC/+VPseH/dYtFd9hxO/0mR73H86ZrRYM8QVkLt20Ib 7Jl26kuGFiyzXJ2qQyRs7MbgkP8Afbabu/BOXb7MRziWw763cIU1bLTGRXx4h5iR sNsZjPgwsV9hit6Q3jwZItTdMOGZFmYvKTX8ChCq1ygIFiElYLo= =Ns/h -----END PGP SIGNATURE----- --gpZddzprOttsUEpV--