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 1mxcvN-0003zr-2U for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Dec 2021 22:39:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mxcvL-00059o-Vs for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Dec 2021 22:38:59 +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 1mxcvL-00059f-NI for pgsql-hackers@lists.postgresql.org; Wed, 15 Dec 2021 22:38:59 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mxcvJ-0003lP-9z for pgsql-hackers@postgresql.org; Wed, 15 Dec 2021 22:38:59 +0000 Received: by mail-il1-x134.google.com with SMTP id m12so7637769ild.0 for ; Wed, 15 Dec 2021 14:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GqaevjDX+tV259wOijybqFjZKxW/a5Meq8VwzdaU/DU=; b=BTRo87EKXMd5dPs2NnysOo38EBsm/eZkQ0Z1PTitLfV274BWSzJJd+hVx4boOC5J2Q 24m/CLk1/gvS4VFUqg0uJWEIf2kqtfjXb2TlOEO2sf3ho5Jowy69bdlNzvJKOqY9ZZzI RuZQrq0gGDSgk9nZghAMbzNyRW9ozjImpm1mcoh3Y63TEEOWINlykyhMSFbcg+dW7oLi Qq6tCGSCs/SvwoYH578j23n7onCv9a5YZtAMuw3hsvcJC09zBjRLZ51psz4Sh+2AMgn8 vI7IIWeUOQxHH4YpocenZGusalPjib+DGh9vPELOqHxjd1dBOgHtaGqNh/fCNnVa0osE yCZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GqaevjDX+tV259wOijybqFjZKxW/a5Meq8VwzdaU/DU=; b=2vq09LP0dJ2Wtq9YGMQJl/BP4F5Fjl2aaizKS94ywAR5bFX6eJDqRYSJrWQI8XFtu+ 53cQs2L5GC7U7mnK8hwZIiJT25YxD7mVvQFiJakxhgobaAQMm613w9laA7fV/Gcegy3a mIMyRjg37Ko0FpCP/P3+/BcfRIpBDxr8x+GDvWjMUh5euwMxGCbuUP/bopQ4OM6WJNmm wDwiwlyuUIBL+Zbt4GGnSIY9S4igzqWlQZ5+Hh9TBBGCeIPCDmsEyxLvYaGCkIpKT3oL /7bua5/oUUsoq4Ft0OTSmPHQDE7pX6g4euqCCR/ZnrEv6Rj2cpZObKO41A6F6bQL44Vk aGOg== X-Gm-Message-State: AOAM532mu9mawY8tvq6jz/VSrVXRiVXRQ0FHFKOYQ4z/xpijaICtsbR/ WXHaNStootTU4DfptFLrCcasuw== X-Google-Smtp-Source: ABdhPJz0bYvX5foPpnKSeBxFTYJh9SLFU8Cy5DWylbrCT5v7mZv6uoZqlwkTOcC/ZZsxKvzihRphmQ== X-Received: by 2002:a05:6e02:2147:: with SMTP id d7mr8065245ilv.219.1639607934861; Wed, 15 Dec 2021 14:38:54 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id k13sm2067560iow.45.2021.12.15.14.38.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Dec 2021 14:38:53 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id A2CBD8006D0; Wed, 15 Dec 2021 16:38:52 -0600 (CST) Date: Wed, 15 Dec 2021 16:38:52 -0600 From: Justin Pryzby To: Melanie Plageman Cc: Andres Freund , 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: <20211215223852.GV17618@telsasoft.com> References: <20211008175620.nspjy6wwmzvyzkrg@alap3.anarazel.de> <20211019192931.eeeohw6yrvqe6bol@alap3.anarazel.de> <20211119164952.mlw7ecj4xxliuuut@alap3.anarazel.de> <20211125011559.GC17618@telsasoft.com> <20211202040653.GM17618@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 03, 2021 at 03:02:24PM -0500, Melanie Plageman wrote: > Thanks again! I really appreciate the thorough review. > > I have combined responses to all three of your emails below. > Let me know if it is more confusing to do it this way. One email is better than three - I'm just not a model citizen ;) Thanks for updating the patch. I checked that all my previous review comments were addressed (except for the part about passing the 3D array to a function - I know that technically the pointer is being passed). +int backend_type_get_idx(BackendType backend_type) +BackendType idx_get_backend_type(int idx) => I think it'd be desirable for these to be either static functions (which won't work for your needs) or macros, or inline functions in the header. - if (strcmp(target, "archiver") == 0) + pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_RESETSHAREDCOUNTER); + if (strcmp(target, "buffers") == 0) => This should be added in alphabetical order. Which is unimportant, but it will also makes the patch 2 lines shorter. The doc patch should also be in order. + * Don't count dead backends. They will be added below There are no => Missing a period. -- Justin