Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIcTV-0001Bz-S3 for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Nov 2017 15:34:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIcTV-00047z-6o for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Nov 2017 15:34:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eIcTU-00047j-Ta for pgsql-hackers@lists.postgresql.org; Sat, 25 Nov 2017 15:34:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eIcTO-0007qk-UY for pgsql-hackers@postgresql.org; Sat, 25 Nov 2017 15:34:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vAPFYOF2001324; Sat, 25 Nov 2017 10:34:24 -0500 From: Tom Lane To: Michael Paquier cc: Kyotaro HORIGUCHI , Sawada Masahiko , "pgsql-hackers@postgresql.org" , Robert Haas Subject: Re: [HACKERS] More stats about skipped vacuums In-reply-to: References: <20171116.193402.26276109.horiguchi.kyotaro@lab.ntt.co.jp> <20171121.160957.124460918.horiguchi.kyotaro@lab.ntt.co.jp> Comments: In-reply-to Michael Paquier message dated "Sat, 25 Nov 2017 19:52:42 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1322.1511624064.1@sss.pgh.pa.us> Date: Sat, 25 Nov 2017 10:34:24 -0500 Message-ID: <1323.1511624064@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > On Sat, Nov 25, 2017 at 12:55 AM, Robert Haas wrote: >> I think that's a good thing to worry about. In the past, Tom has >> expressed reluctance to make stats tables that have a row per table >> any wider at all, IIRC. > Tom, any opinions to offer here? pg_stat_all_tables is currently at 22 > columns (this takes two full lines on my terminal with a font size at > 13). With the first patch of what's proposed on this thread there > would be 24 columns. Perhaps it would be time to split the vacuum > statistics into a new view like pg_stat_tables_vacuum or similar? My concern is not with the width of any view --- you can always select a subset of columns if a view is too wide for your screen. The issue is the number of counters in the stats collector's state. We know, without any doubt, that widening PgStat_StatTabEntry causes serious pain to people with large numbers of tables; and they have no recourse when we do it. So the bar to adding more counters is very high IMO. I won't say never, but I do doubt that something like skipped vacuums should make the cut. If we could get rid of the copy-to-a-temporary-file technology for transferring the stats collector's data to backends, then this problem would probably vanish or at least get a lot less severe. But that seems like a nontrivial project. With the infrastructure we have today, we could probably keep the stats tables in a DSM segment; but how would a backend get a consistent snapshot of them? regards, tom lane