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 1pFe22-0004GO-HJ for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 16:32:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFe21-0005TD-81 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 16:32:53 +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 1pFe20-0005T2-Ru for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 16:32:52 +0000 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFe1y-0006IF-Di for pgsql-hackers@postgresql.org; Wed, 11 Jan 2023 16:32:51 +0000 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-1322d768ba7so16074070fac.5 for ; Wed, 11 Jan 2023 08:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EobtXIkXc+1S7Cqusmza88gCiVpjX0/D5iBqCA8HnFk=; b=R3/fbIHg6qK3+iBEZOiKVNi5gFJW1beJjhcbIdz8vaHLo1Pcc2IPApukHn5DeHuifm UBkfW7l4Kz9Q4AeWjstgjCKnwfZlipIJu1TGqniP2dz3sWnJaSHOKu2BFk45sLPevayM wObZXNUt8S+O308cdBN2VAaqB9+2mBjWJk+wlfMUAchJPuTDrszxnLzxtP62iCSmqG5l 3kPpn2Js4Zvpjtvy+xcT993mVwH+Rm6IL7AIu8FgBMMF2bQVKpGmOiXbwKwnTf8aCo6/ /ZnIEkv4dnMoJc8kCbqXGkD+oONHJ3BylXZZ9OE+YCswBm03m1oreFzFN4wUmd7HD0Ga izYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EobtXIkXc+1S7Cqusmza88gCiVpjX0/D5iBqCA8HnFk=; b=CE9rmx48RQCqMMGQuLZMTMpW4ILvM8+P+IEIDfSJYADJEXI/bDyol//8jPc4mfPKZN 3CqPBeBQMd54/UTWqo21sEVzrQoEDIMIthEShA6nqpJf+1PjLU6xdAC/+fUOafgKXKNd FEDwILRhjw3uipJ0X/ZfgnJuBz5Dt2mbD/HsuXEx9GeuBxdJS1VUofDkEGU9SJO/HYlZ GSgiyHrw9UN/+yZi8C91QQHBVuVMBtQnOKqYEKfMy46nLf+5bBpPo4MeBM1bM1abGMNf Mxh25qWShuKaLlR7lv1CmKVhyoCA3l6FpPDOgeSI6w6bzWJ+xXd6QpLi5pvTnLflO1o5 vbHA== X-Gm-Message-State: AFqh2kpg1Zy0KqePKt1Ri+1VDi8Mhg2RcZDi00qsOX5mf7WkAHGECylZ LUI97dZVUHW92evglUmt0DHdGQSUcDiIs2dmovE= X-Google-Smtp-Source: AMrXdXu5EqIYt2p5PuWd0x9aHjr5xRu5wXuaL9rJxT4JFSsXcP+8eRZsDCD+D6ncMyf+0Eu9mcyVlDKce3F7VzhFeAk= X-Received: by 2002:a05:6870:44d2:b0:157:1c46:9119 with SMTP id t18-20020a05687044d200b001571c469119mr1549348oai.38.1673454769406; Wed, 11 Jan 2023 08:32:49 -0800 (PST) MIME-Version: 1.0 References: <20220712171810.7f2ppc45torgaavu@awork3.anarazel.de> <20220720165050.ophdqnun32idffq6@alap3.anarazel.de> <20220825191527.ki6wggnawlrl53i6@awork3.anarazel.de> <20221228235613.ep47flalmnkqgnu7@awork3.anarazel.de> In-Reply-To: From: vignesh C Date: Wed, 11 Jan 2023 22:02:37 +0530 Message-ID: Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) To: Melanie Plageman Cc: Andres Freund , Lukas Fittl , Justin Pryzby , Alvaro Herrera , Kyotaro Horiguchi , Magnus Hagander , Pg Hackers , Thomas Munro , Maciek Sakrejda Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 10 Jan 2023 at 02:41, Melanie Plageman wrote: > > Attached is v45 of the patchset. I've done some additional code cleanup > and changes. The most significant change, however, is the docs. I've > separated the docs into its own patch for ease of review. > > The docs patch here was edited and co-authored by Samay Sharma. > I'm not sure if the order of pg_stat_io in the docs is correct. > > The significant changes are removal of all "correspondence" or > "equivalence"-related sections (those explaining how other IO stats were > the same or different from pg_stat_io columns). > > I've tried to remove references to "strategies" and "Buffer Access > Strategy" as much as possible. > > I've moved the advice and interpretation section to the bottom -- > outside of the table of definitions. Since this page is primarily a > reference page, I agree with Samay that incorporating interpretation > into the column definitions adds clutter and confusion. > > I think the best course would be to have an "Interpreting Statistics" > section. > > I suggest a structure like the following for this section: > - Statistics Collection Configuration > - Viewing Statistics > - Statistics Views Reference > - Statistics Functions Reference > - Interpreting Statistics > > As an aside, this section of the docs has some other structural issues > as well. > > For example, I'm not sure it makes sense to have the dynamic statistics > views as sub-sections under 28.2, which is titled "The Cumulative > Statistics System." > > In fact the docs say this under Section 28.2 > https://www.postgresql.org/docs/current/monitoring-stats.html > > "PostgreSQL also supports reporting dynamic information about exactly > what is going on in the system right now, such as the exact command > currently being executed by other server processes, and which other > connections exist in the system. This facility is independent of the > cumulative statistics system." > > So, it is a bit weird that they are defined under the section titled > "The Cumulative Statistics System". > > In this version of the patchset, I have not attempted a new structure > but instead moved the advice/interpretation for pg_stat_io to below the > table containing the column definitions. For some reason cfbot is not able to apply this patch as in [1], please have a look and post an updated patch if required: === Applying patches on top of PostgreSQL commit ID 3c6fc58209f24b959ee18f5d19ef96403d08f15c === === applying patch ./v45-0001-pgindent-and-some-manual-cleanup-in-pgstat-relat.patch patching file src/backend/storage/buffer/bufmgr.c patching file src/backend/storage/buffer/localbuf.c patching file src/backend/utils/activity/pgstat.c patching file src/backend/utils/activity/pgstat_relation.c patching file src/backend/utils/adt/pgstatfuncs.c patching file src/include/pgstat.h patching file src/include/utils/pgstat_internal.h === applying patch ./v45-0002-pgstat-Infrastructure-to-track-IO-operations.patch gpatch: **** Only garbage was found in the patch input. [1] - http://cfbot.cputube.org/patch_41_3272.log Regards, Vignesh