Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j83N9-0005Rp-48 for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Feb 2020 14:45:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j83M9-0007Qn-Oy for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Feb 2020 14:44:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j83M9-0007Qf-AW for pgsql-hackers@lists.postgresql.org; Sat, 29 Feb 2020 14:44:41 +0000 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j83M6-0008WO-4V for pgsql-hackers@postgresql.org; Sat, 29 Feb 2020 14:44:40 +0000 Received: by mail-yw1-xc43.google.com with SMTP id j186so6445839ywe.0 for ; Sat, 29 Feb 2020 06:44:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=UCw3Udh5bsSXhih9nm6andMYywz4HRNkXpbHrK5wNps=; b=kSae9PRGfYdx4D5dJiyOw7W3clKdwMNAl9LhrP0tRs6gUTVK/wibz4hEcPiVod6idn xmFiwwXTZKOrhLcmnE2L5nre1kH0JOOYWlahUVRMuTD9YK+w/daaNYOKj8WopcgwU5FS qS8G/B929nO8PZac+GYkru2sdH9EDyVLH8zAqLVGX6vYwrXcVQrfCHv3vQYPgPw4uqS1 jMfQ61aPDv09Z9SzP+6qXyTqHEOqbhRvoEMJtleSw7YoPhBmYFymaHhoDgR73VFP08Pq 5OqZLdE5LQVeHybtlRNShJrJPtUqzmE7FnDxy7Zyphrrs1/niZlsY10L9JkO1dBgRkEq TbQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=UCw3Udh5bsSXhih9nm6andMYywz4HRNkXpbHrK5wNps=; b=i6I0wYmke8+Bkqa+YfvbF1POcwBtV2kzHgMSYHbqzPJiHwcQ8qXqoL0ClpzZZGzAt3 fOwqBdOc8HHTRON2yrJ77w0eEFnWxK09SGX7aa/MeNGihNKa/CWhFiDKgKcuCODPqON0 u8iVNnhrOTsEERsFWbpLA2i1Pxyu1WYyx/nr7JflCXMpNA5SMZPcD8rYNlHWJNMgUQZp ytVy27IEPOtkX7ouZUYrIDep/eyzPzvSVxROrSr0W3n/a3pqRcng68PeA9/Lq7xXojhW aj+zhlYqBamiC8zIzdTFRxylGNIBM7dbQmDMH5gyXGimsSaYYk5lxElycZ8TKt7k3S5i 6+vg== X-Gm-Message-State: APjAAAX2VexTa6YrYjGK1kaimDRYAgCWkj5cFkR6gWlq1AZKNfZ+4FHb 1HCIxpreRU1UuaKqAc0eBGezLQ== X-Google-Smtp-Source: APXvYqzLiuAmzPYBnv8zVjWCYbt5NufZ85026UyOvTbY31q3bfc3T1ncBXr2/zk1RK0Ew4VH7ASpnw== X-Received: by 2002:a25:e785:: with SMTP id e127mr8105854ybh.276.1582987476327; Sat, 29 Feb 2020 06:44:36 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([199.116.115.139]) by smtp.gmail.com with ESMTPSA id m128sm1732572ywc.89.2020.02.29.06.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Feb 2020 06:44:35 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 7BA77300681; Sat, 29 Feb 2020 11:44:26 -0300 (-03) Date: Sat, 29 Feb 2020 11:44:26 -0300 From: Alvaro Herrera To: Tomas Vondra Cc: Masahiko Sawada , "tsunakawa.takay@fujitsu.com" , "pgsql-hackers@postgresql.org" Subject: Re: SLRU statistics Message-ID: <20200229144426.GA32500@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200229122441.ow7gnnqgesmojyc3@development> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Feb-29, Tomas Vondra wrote: > Did we actually remove track-enabling GUCs? I think we still have > > - track_activities > - track_counts > - track_io_timing > - track_functions > > But maybe I'm missing something? Hm I remembered we removed the one for row-level stats (track_row_stats), but what we really did is merge it with block-level stats (track_block_stats) into track_counts -- commit 48f7e6439568. Funnily enough, if you disable that autovacuum won't work, so I'm not sure it's a very useful tunable. And it definitely has more overhead than what this new GUC would have. > > I find SlruType pretty odd, and the accompanying "if" list in > > pg_stat_get_slru() correspondingly so. Would it be possible to have > > each SLRU enumerate itself somehow? Maybe add the name in SlruCtlData > > and query that, somehow. (I don't think we have an array of SlruCtlData > > anywhere though, so this might be a useless idea.) > > Well, maybe. We could have a system to register SLRUs dynamically, but > the trick here is that by having a fixed predefined number of SLRUs > simplifies serialization in pgstat.c and so on. I don't think the "if" > branches in pg_stat_get_slru() are particularly ugly, but maybe we could > replace the enum with a registry of structs, something like rmgrlist.h. > It seems like an overkill to me, though. Yeah, maybe we don't have to fix that now. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services