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 1of2hI-0005xg-Kj for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Oct 2022 17:24:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1of2hH-0002AX-8j for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Oct 2022 17:24:11 +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 1of2hG-0002AN-VU for pgsql-hackers@lists.postgresql.org; Sun, 02 Oct 2022 17:24:10 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1of2hE-0007mI-Ff for pgsql-hackers@postgresql.org; Sun, 02 Oct 2022 17:24:10 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id A7EF232004CE; Sun, 2 Oct 2022 13:24:05 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 02 Oct 2022 13:24:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1664731445; x=1664817845; bh=maMU0bkLsY 1knYy8se7K3I61OrK7AxU8vv4GqMVLGxM=; b=Gux+og55k9cXbHfCi+iw7raqOc JbSVUv7MdaEUm4gcGUtssDVjlSLTXlJmFTT5gFENqxwUmqi3evc+5CLN5v1Ym4Uh Zg8juZUN7/zpWk3/Hz0lcFfwynEWExnhBKEBX4ndHwOi9Xn43ZLU//3tuTNUKVaA +SvQSNjBsMs0LTljnfShwTotdJO/7WZ79ERoNh3efcWkDl3UukpTv8cm6HkHO2Y5 NAr7jmg3xLJhUTZUk1q/xPrC2Duv+C4C4e74vGQZ5VwwqddrAySmNJecnFpoc+d5 YZ9SdcZDR4tJb1aBzvkLM6oTEXOpIwYfZNzsNKwcuTe3v0xw1LOGcrDUU5Yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1664731445; x=1664817845; bh=maMU0bkLsY1knYy8se7K3I61OrK7 AxU8vv4GqMVLGxM=; b=gr5H5C/iCZikDT6fVuTXx/lxt7wQHPBFXWXkctYdj2ms QYxgT+tg7LTmZwzjv9p+9UNCJRobw82rrb/F7Yipz2aj/hUi8Bwo0/a4+WZMwnb8 2jagBv5/pz9x/1BfVOmGpFfUN/b7O9nqCiEOapgkd8WTZa6u7VovstJiThRfHsDS zAc+SG7fmUkDE4cKW6q91E+u8u9IXvb/MRFW+nn9VHrjXlfKc1LJzQoUgf9wJ9/L WTLrwRrgzbGkQDW4T02ZO2UzVDEp75zSoZKATlh6LqOI5lQ8jyGoGPZ+6+JcmCiD Q4L+e3wuoTIkRfzAOhPYpk5l8L0ZhYM3ApFnonKI5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeehjedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgu rhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtf frrghtthgvrhhnpefhgeejtddugeevffetfeejleejvdegteeulefftdffjeegffeggeeg ffetgeehueenucffohhmrghinheptghirhhruhhsqdgtihdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghr rgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 2 Oct 2022 13:24:04 -0400 (EDT) Date: Sun, 2 Oct 2022 10:24:04 -0700 From: Andres Freund To: Melanie Plageman Cc: Justin Pryzby , Alvaro Herrera , Kyotaro Horiguchi , Magnus Hagander , Pg Hackers , Lukas Fittl , Thomas Munro Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) Message-ID: <20221002172404.xyzhftbedh4zpio2@awork3.anarazel.de> References: <20220706192047.sikr2vuwvpslqdrw@alap3.anarazel.de> <20220712171810.7f2ppc45torgaavu@awork3.anarazel.de> <20220720165050.ophdqnun32idffq6@alap3.anarazel.de> <20220825191527.ki6wggnawlrl53i6@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-09-27 14:20:44 -0400, Melanie Plageman wrote: > v30 attached > rebased and pgstat_io_ops.c builds with meson now > also, I tested with pgstat_report_stat() only flushing when forced and > tests still pass Unfortunately tests fail in CI / cfbot. E.g., https://cirrus-ci.com/task/5816109319323648 https://api.cirrus-ci.com/v1/artifact/task/5816109319323648/testrun/build/testrun/main/regress/regression.diffs diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/stats.out /tmp/cirrus-ci-build/build/testrun/main/regress/results/stats.out --- /tmp/cirrus-ci-build/src/test/regress/expected/stats.out 2022-10-01 12:07:47.779183501 +0000 +++ /tmp/cirrus-ci-build/build/testrun/main/regress/results/stats.out 2022-10-01 12:11:38.686433303 +0000 @@ -997,6 +997,8 @@ -- Set temp_buffers to a low value so that we can trigger writes with fewer -- inserted tuples. SET temp_buffers TO '1MB'; +ERROR: invalid value for parameter "temp_buffers": 128 +DETAIL: "temp_buffers" cannot be changed after any temporary tables have been accessed in the session. CREATE TEMPORARY TABLE test_io_local(a int, b TEXT); SELECT sum(alloc) AS io_sum_local_allocs_before FROM pg_stat_io WHERE io_context = 'local' \gset SELECT sum(read) AS io_sum_local_reads_before FROM pg_stat_io WHERE io_context = 'local' \gset @@ -1037,7 +1039,7 @@ SELECT :io_sum_local_writes_after > :io_sum_local_writes_before; ?column? ---------- - t + f (1 row) SELECT :io_sum_local_extends_after > :io_sum_local_extends_before; So the problem is just that something else accesses temp buffers earlier in the same test. That's likely because since you sent your email commit d7e39d72ca1c6f188b400d7d58813ff5b5b79064 Author: Tom Lane Date: 2022-09-29 12:14:39 -0400 Use actual backend IDs in pg_stat_get_backend_idset() and friends. was applied, which adds a temp table earlier in the same session. I think the easiest way to make this robust would be to just add a reconnect before the place you need to set temp_buffers, that way additional temp tables won't cause a problem. Setting the patch to waiting-for-author for now. Greetings, Andres Freund