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 1pPe66-00044c-GT for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Feb 2023 06:38:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPe65-0008Ij-9D for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Feb 2023 06:38:25 +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 1pPe63-0008Ia-Jt for pgsql-hackers@lists.postgresql.org; Wed, 08 Feb 2023 06:38:24 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPe5z-0003J4-QY for pgsql-hackers@postgresql.org; Wed, 08 Feb 2023 06:38:23 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 455A55C00FD; Wed, 8 Feb 2023 01:38:16 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 08 Feb 2023 01:38:16 -0500 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=fm3; t=1675838296; x=1675924696; bh=SOKO7AA9+E E5pnlTqFE5duJ0a+yw3k3gKxga5Y5jhJY=; b=RkSVNGKOKKtbgGJdkax0/WdBcC vyo5IUJHkPAbEwC5WiH0E4UjcB/n+b7H2uWsAUesGYkFg6sQ0QgSunbSqWR4hsSJ XLcHc55lHXbz57BxJUhxmJ73wj661qNG7NznpZ3InKHtRVuZbXpABrmV5uo/MLh4 iCQ2p2sDV7kdqu6RyVD3KWuWBJ+GxRAcZ3pn3zRiu32+f/Mu5NVObwooVJlf7YKl +caWnxQNZNL10BFD1IvKxNG07gNjjINufh4o9JBJ4Jm8+L2H730l0zdv42fmV1LF 7IBSzWGLN/iIgQ5Gtbsg66NiZyq/IVq/Fpw6nyDk6E2hsRDX6ygPMKfgXTtw== 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= fm1; t=1675838296; x=1675924696; bh=SOKO7AA9+EE5pnlTqFE5duJ0a+yw 3k3gKxga5Y5jhJY=; b=RLYpXPbT/AtJlkGyEebXwnUuSHqkbWru3Pvj1GZkhabY Nxe4ULYW9OuDB2RXPwNbtsZZBNlp9cl91sdGy9BFhzlMVUM2YAK2E89enW5XHROt JEgKVDkLZRKnh7wLKbfQMgoMhTZf/CdQymbcf+qoOqVS+sfcXZNn6zaUtkCTDWUS Xk+Ekn/rZn976DdSnWBUGWtz2x2EezfhiUVO+rjwEFgEQ0C8oaR/x9HnicSJpRZy E4sRb0eq4kQv8DUouyQw4UHls1pdBex02ZuKokrLZBxmeb4Q3iqqhd3eo1k18FuQ 2nC29J/MEzArOjwF/MPzyH4a0AtIovrw1t2T9C9WsQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegledgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegr nhgrrhgriigvlhdruggvqeenucggtffrrghtthgvrhhnpedvvdefheejudegieekiedvhf etledtgfelgeffledtgefgffegfeduheelvefggeenucffohhmrghinhepshhnrghpshhh ohhtrdhiohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Feb 2023 01:38:15 -0500 (EST) Date: Tue, 7 Feb 2023 22:38:14 -0800 From: Andres Freund To: Kyotaro Horiguchi Cc: melanieplageman@gmail.com, vignesh21@gmail.com, pryzby@telsasoft.com, lukas@fittl.com, alvherre@alvh.no-ip.org, magnus@hagander.net, pgsql-hackers@postgresql.org, thomas.munro@gmail.com, m.sakrejda@gmail.com Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) Message-ID: <20230208063814.boyh5ibydbfuo2uk@awork3.anarazel.de> References: <20230124.172203.448918351330829200.horikyota.ntt@gmail.com> <20230124223512.xqp7tjgqvzqokaxq@awork3.anarazel.de> <20230125.165617.724951472557617342.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230125.165617.724951472557617342.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I did another read through the series. I do have some minor changes, but they're minor. I think this is ready for commit. I plan to start pushing tomorrow. The changes I made are: - the tablespace test changes didn't quite work in isolation / needed a bit of polishing - moved the tablespace changes to later in the series - split the tests out of the commit adding the view into its own commit - minor code formatting things (e.g. didn't like nested for()s without {}) On 2023-01-25 16:56:17 +0900, Kyotaro Horiguchi wrote: > At Tue, 24 Jan 2023 14:35:12 -0800, Andres Freund wrote in > > > + write_chunk_s(fpout, &pgStatLocal.snapshot.io); > > > + if (!read_chunk_s(fpin, &shmem->io.stats)) > > > > > > The names of the functions hardly make sense alone to me. How about > > > write_struct()/read_struct()? (I personally prefer to use > > > write_chunk() directly..) > > > > That's not related to this patch - there's several existing callers for > > it. And write_struct wouldn't be better imo, because it's not just for > > structs. > > Hmm. Then what the "_s" stands for? Size. It's a macro that just forwards to read_chunk()/write_chunk(). > > > > + Number of read operations in units of op_bytes. > > > > > > I may be the only one who see the name as umbiguous between "total > > > number of handled bytes" and "bytes hadled at an operation". Can't it > > > be op_blocksize or just block_size? > > > > > > + b.io_object, > > > + b.io_context, > > > > No, block wouldn't be helpful - we'd like to use this for something that isn't > > uniform blocks. > > What does the field show in that case? The mean of operation size? Or > one row per opration size? If the former, the name looks somewhat > wrong. If the latter, block_size seems making sense. 1, so that it's clear that the rest are in bytes. Greetings, Andres Freund