Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbWgp-0004cf-DV for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jul 2018 19:46:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbWgm-0005Yr-Jr for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jul 2018 19:46:44 +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.89) (envelope-from ) id 1fbWgm-0005Yj-D7 for pgsql-hackers@lists.postgresql.org; Fri, 06 Jul 2018 19:46:44 +0000 Received: from lists.commandprompt.com ([69.168.55.30]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbWgh-0000sQ-JV for pgsql-hackers@postgresql.org; Fri, 06 Jul 2018 19:46:43 +0000 Received: from [192.168.50.9] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 4B15419B; Fri, 6 Jul 2018 12:46:36 -0700 (PDT) Received: from c-73-221-208-9.hsd1.wa.comcast.net ([73.221.208.9] helo=[192.168.50.9]) by assp.commandprompt.com with SMTPSA(TLSv1_2 ECDHE-RSA-AES128-GCM-SHA256) (2.5.1); 6 Jul 2018 12:46:35 -0700 Subject: Re: shared-memory based stats collector To: Robert Haas Cc: Andres Freund , Magnus Hagander , Tom Lane , Kyotaro HORIGUCHI , PostgreSQL-development References: <20180629.173418.190173462.horiguchi.kyotaro@lab.ntt.co.jp> <20180703.190144.222427588.horiguchi.kyotaro@lab.ntt.co.jp> <67470.1530739431@sss.pgh.pa.us> <20180706185750.b6h5cwif53zfieu7@alap3.anarazel.de> <608c6c72-96ef-f002-65fe-6889cc37db99@commandprompt.com> From: "Joshua D. Drake" Organization: Command Prompt, Inc. Message-ID: <97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com> Date: Fri, 6 Jul 2018 12:46:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Assp-Version: 2.5.1(16177) on assp.commandprompt.com X-Assp-ID: assp.commandprompt.com m1-06396-08600 X-Assp-Session: 7F24948481F0 (mail 1) X-Assp-Original-Subject: Re: shared-memory based stats collector X-Assp-Client-SSL: yes List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/06/2018 12:34 PM, Robert Haas wrote: > On Fri, Jul 6, 2018 at 3:02 PM, Joshua D. Drake wrote: >> Will stats, if we move toward the suggested changes be "less" accurate than >> they are now? We already know that stats are generally not accurate but they >> are close enough. If we move toward this change will it still be close >> enough? > There proposed change would have no impact at all on the long-term > accuracy of the statistics. It would just mean that there would be > race conditions when reading them, so that for example you would be > more likely to see a count of heap scans that doesn't match the count > of index scans, because an update arrives in between when you read the > first value and when you read the second one. I don't see that > mattering a whole lot, TBH, but maybe I'm missing something. I agree that it probably isn't a big deal. Generally speaking when we look at stats it is to get an "idea" of what is going on. We don't care if we are missing an increase/decrease of 20 of any particular value within stats. Based on this and what Andres said, it seems like a net win to me. JD > -- Command Prompt, Inc. || http://the.postgres.company/ || @cmdpromptinc *** A fault and talent of mine is to tell it exactly how it is. *** PostgreSQL centered full stack support, consulting and development. Advocate: @amplifypostgres || Learn: https://postgresconf.org ***** Unless otherwise stated, opinions are my own. *****