Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJSdR-0004Lt-HY for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Nov 2017 23:16:21 +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 1eJSdQ-0000w3-Fp for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Nov 2017 23:16:20 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eJSdQ-0000vt-4X for pgsql-hackers@lists.postgresql.org; Mon, 27 Nov 2017 23:16:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJSdI-00008z-08 for pgsql-hackers@postgresql.org; Mon, 27 Nov 2017 23:16:19 +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 vARNG613023561; Mon, 27 Nov 2017 18:16:06 -0500 From: Tom Lane To: Magnus Hagander cc: Robert Haas , Michael Paquier , Kyotaro HORIGUCHI , Sawada Masahiko , "pgsql-hackers@postgresql.org" 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> <1323.1511624064@sss.pgh.pa.us> <2077.1511629794@sss.pgh.pa.us> <1451.1511727581@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Mon, 27 Nov 2017 22:05:06 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23559.1511824566.1@sss.pgh.pa.us> Date: Mon, 27 Nov 2017 18:16:06 -0500 Message-ID: <23560.1511824566@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Magnus Hagander writes: > What I've been thinking about for that one before is if we could just > invent a protocol (shmq based maybe) whereby autovacuum can ask the stats > collector for a single table or index stat. If autovacuum never needs to > see a consistent view between multiple tables, I would think that's going > to be a win in a lot of cases. Perhaps. Autovac might run through quite a few tables before it finds one in need of processing, though, so I'm not quite certain this would yield such great benefits in isolation. > However, when it comes to the stats system, I'd say that on any busy system > (which would be the ones to care about), the stats structures are still > going to be *written* a lot more than they are read. Uh, what? The stats collector doesn't write those files at all except on-demand. regards, tom lane