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 1pAgIU-0006Mr-2Y for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 23:57:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAgHT-0005fM-EO for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 23:56:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pAgHT-0005fD-5H for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 23:56:19 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pAgHQ-0004JN-Co for pgsql-hackers@postgresql.org; Wed, 28 Dec 2022 23:56:17 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 760995C00AB; Wed, 28 Dec 2022 18:56:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 28 Dec 2022 18:56:15 -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=fm2; t=1672271775; x=1672358175; bh=AVqyHwixg5 aF2A3VE3P1ukb5l8w+8hsiFefSHx66FqA=; b=k+InIlW39VASjiMi+KsipW0QI3 tCfMGKVrNwNAx+KQpQcl9Ui8hop9eVDmyIXu9s2iXp98l76/dluQmufNEv3O+Ist kAXvndczVw2LveHiWpPSbgmSvoS7rYmCUJnr46eyDGWtC1icS+EdYhg0OX7KZ/AB vDx3EGDB83qeJh2+58QIq1Ii498DRw5tl/Ha+tK0uUZ2011ToBnwLcha9PcSIkwa Fl9V8XQR5biBYmvvhT+cNupmcjtJiQm/q56U+ODT4fn5j1ES0OehLC5S7MaFX0ha 1O8ebxsR7A/Xv38fnIYeMX7PIYvfljA8sDesgj6Rzk22fTEYqjLAeFGOvljA== 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=1672271775; x=1672358175; bh=AVqyHwixg5aF2A3VE3P1ukb5l8w+ 8hsiFefSHx66FqA=; b=HZNK6c7YUCR+bvtBQIDrCRw2JVCJ4jCG1umHQ4Ec0sH0 F5yT0cP+McyrgyoLYVUc+UISj9hLVL+wiCg92Y2bhWi8qxLhtYbF6MmaGeTK6CmV 37IBfJpf4SpepXcIhVI4NBbZbe8hnvv4fFX0e6k10EuVpb0xfs+BTp9AAgtIBxB0 y3MG8mtW133pCbHdpZEVAyvOUBhb0xSgAbfD6gVDOxERvORzOR2eO7zHYzL21mk0 NJ5WEXPl0MvdaOE7hRo3kVDRzqrsZOqaUVFLtIcSGQW6YDgXYTqnNfUxvYbqZ+Ea q+Snp1ua5a97sN3/CYpfnthvCDP15eHAWNmbzO70uQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrieefgddujecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpeehffdtffehudffhefftdfgjefghfevheeuiedvhfefhfefkeehuefggeef gfelffenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 28 Dec 2022 18:56:14 -0500 (EST) Date: Wed, 28 Dec 2022 15:56:13 -0800 From: Andres Freund To: Melanie Plageman Cc: Lukas Fittl , Justin Pryzby , Alvaro Herrera , Kyotaro Horiguchi , Magnus Hagander , Pg Hackers , Thomas Munro , Maciek Sakrejda Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) Message-ID: <20221228235613.ep47flalmnkqgnu7@awork3.anarazel.de> References: <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-10-06 13:42:09 -0400, Melanie Plageman wrote: > > Additionally, some minor notes: > > > > - Since the stats are counting blocks, it would make sense to prefix the view columns with "blks_", and word them in the past tense (to match current style), i.e. "blks_written", "blks_read", "blks_extended", "blks_fsynced" (realistically one would combine this new view with other data e.g. from pg_stat_database or pg_stat_statements, which all use the "blks_" prefix, and stop using pg_stat_bgwriter for this which does not use such a prefix) > > I have changed the column names to be in the past tense. For a while I was convinced by the consistency argument (after Melanie pointing it out to me). But the more I look, the less convinced I am. The existing IO related stats in pg_stat_database, pg_stat_bgwriter aren't past tense, just the ones in pg_stat_statements. pg_stat_database uses past tense for tup_*, but not xact_*, deadlocks, checksum_failures etc. And even pg_stat_statements isn't consistent about it - otherwise it'd be 'planned' instead of 'plans', 'called' instead of 'calls' etc. I started to look at the naming "tense" issue again, after I got "confused" about "extended", because that somehow makes me think about more detailed stats or such, rather than files getting extended. ISTM that 'evictions', 'extends', 'fsyncs', 'reads', 'reuses', 'writes' are clearer than the past tense versions, and about as consistent with existing columns. FWIW, I've been hacking on this code a bunch, mostly around renaming things and changing the 'stacking' of the patches. My current state is at https://github.com/anarazel/postgres/tree/pg_stat_io A bit more to do before posting the edited version... Greetings, Andres Freund