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 1vipLV-00GPf3-1l for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 07:43:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vipLU-00BoGQ-1w for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 07:43:12 +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 1vipLU-00BoGH-0y for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 07:43:12 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vipLS-001jPM-0i for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 07:43:11 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-47edd9024b1so4765585e9.3 for ; Wed, 21 Jan 2026 23:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769067789; x=1769672589; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=XJe1SmW9GeQIo9Y4/Gd4/xNE3vjledknJgP2OIyuhA8=; b=E3T6FMIOpGSGo1LjenWvatH+4wK8//vlKRQRrtbcKMBXyvQQslsPvc5aFJqzGXwBwR FGDq2HNliUV0kV7HwHz9bHQiKUyI/GYoFBoll/vidKjEfzSR5tE2elCsJ9BQnt8o30oO zo2VZhIKwYGSP63d5RnHT8Ilp3rdTK0dFrcl0l1F7CsXdRsCFH9KlXyeUwKXvNYLQ/7k e31oLNjfCXzOBUKH8YN/5ZnYUhkpPYBorSYBOLwAoGcUKBv7fDB86VH3j1n1p1NqsALC V3JSQmIF9Q32tzsr7BlsK6zgj98/jEDPrb4mA6r8GhTv1UjdjmypdK5z5jx6Ijkfj+ue VrvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769067789; x=1769672589; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XJe1SmW9GeQIo9Y4/Gd4/xNE3vjledknJgP2OIyuhA8=; b=tfA33rOAOI295Jq684QER2cEBE/SvvZqdFnphPj3B4HATWzX3I71dEYcPyy7oV5ElF VcQxtYLErMvpSwl9jbWtds/capS/uP84boY2bGEc9wNc33j6qY+iAU/dcLRoVjFieVQf qbvPAmNUshk5M0hjSTJ/3sXmDH4EKuQz+8M79EwoRJTx131r5YhFuH7h+NUXe5AOMX5H M/vYgqBhdt4D28pBmm+RIqHv7yyYHlcKPfqzau1rJ4FvgXDfp5e5aZU8fNViJaTj/c3s JL9EK0b1ghFSERZgcHkupdAEyqRu1Zc+T2kv6uPbhlya4gdbfyuYBMiTCAkaDCZKtclN Fw1g== X-Forwarded-Encrypted: i=1; AJvYcCWD4z7vRf/CNPCsN7fKnMm0jw+fjxuBO9vvkKmG07KRXvCxfB/Y1dZk+7mGteiK+y6OmdUJtrmSprR7+Rhe@lists.postgresql.org X-Gm-Message-State: AOJu0Yw1iM9J58A2e9gMHq2Lb+DgTzIbPU166q12iHXY2Uoy5OnTNpvH KM4vIfXIvGOMUPR6rNDDc8zhQim09xyIWxL9cGy2tJVcAY5xYhRWO2Ag X-Gm-Gg: AZuq6aLjVR4st5UKpehDlIaZOMN9pPv40M4HH+w3qNYWNmg9qEO7xUo+BerqGFNBpPV 992k1wXtvundoIZruMTOWwg6gM0BcNJbPXudN4f0mRjB0ucLPZlAdA1IejiF+OuJ44biymCd7Ay 5gZ2Gwa7Sz2NoOMp9Y5AU8/GSfnbTJsNdZhqyuDrrK4DHOlcJidrwqz4A8SCotHAUBmtJpYw/6I g8V77ghLm/wTcc8ccxreDhKDvjSBShxOSzQCfccZ/OqtAiFKHCfdnLGy1HUiAa918HxzHyozA5F hagFYR9ldgb9mJLvERhR2i8VJsMuDnbFb0+G1CnvhbXebK7n6XXhVHOmhA5+HAtQH29V4bLJyK+ IBIATyqHkX+VWjBSV/VuUIO+KYXH5WoiffjpLsBzvIfmoApEGuofGJh/a5cssbFcYxPgGDnFdZm isemw3vCTd4IPQRp/mdOUxiNuplsAg5Z7n88fs8y73y2SK9p+VJDDfBbAkyxXXNGy+pAapngkWS dJX9yNX4mwh880WW/udrAPRAK+g7rhLBy1wlWuSfMQL5g== X-Received: by 2002:a05:600c:4f41:b0:47d:586e:2fea with SMTP id 5b1f17b1804b1-4801ead10cemr306642525e9.15.1769067789314; Wed, 21 Jan 2026 23:43:09 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435924ae723sm16147487f8f.41.2026.01.21.23.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 23:43:08 -0800 (PST) Date: Thu, 22 Jan 2026 07:43:07 +0000 From: Bertrand Drouvot To: Fujii Masao Cc: Sami Imseih , Michael Paquier , pgsql-hackers@lists.postgresql.org, Zsolt Parragi Subject: Re: Flush some statistics within running transactions Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Jan 22, 2026 at 10:56:48AM +0900, Fujii Masao wrote: > On Thu, Jan 22, 2026 at 10:41 AM Sami Imseih wrote: > > > > Sure, Bertrand mentioned early in the thread that the anytime flushes > > could be made configurable. Perhaps that is a good idea where we can > > default with something large like 10s intervals for anytime flushes, but allow > > the user to configure a more frequent flushes ( although I would think > > that 1 sec is the minimum we should allow ). > > +1 on adding an option to control the interval. With a fixed interval > (for example, 1s), log_lock_waits messages could be emitted that frequently, > which may be annoying for some users. > > Of course, it would be even better if these periodic wakeups did not trigger > log_lock_waits messages at all, though. pgstat_report_anytime_stat() is called with the force parameter set to false, means that the flushes are done with nowait = true means that LWLockConditionalAcquire() is used. In that case, do you still see cases where log_lock_waits messages could be triggered due to the new flush? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com