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 1fbW0K-0002Hl-9O for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jul 2018 19:02:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fbW0I-0005vK-7E for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Jul 2018 19:02:50 +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 1fbW0I-0005vC-0I for pgsql-hackers@lists.postgresql.org; Fri, 06 Jul 2018 19:02:50 +0000 Received: from lists.commandprompt.com ([2604:da00:2:2:5054:ff:fe07:7618]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fbW0D-0008CF-2m for pgsql-hackers@postgresql.org; Fri, 06 Jul 2018 19:02:48 +0000 Received: from [192.168.50.9] (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id 52A9459A; Fri, 6 Jul 2018 12:02:40 -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:02:40 -0700 Subject: Re: shared-memory based stats collector To: Andres Freund , Robert Haas Cc: 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> From: "Joshua D. Drake" Organization: Command Prompt, Inc. Message-ID: <608c6c72-96ef-f002-65fe-6889cc37db99@commandprompt.com> Date: Fri, 6 Jul 2018 12:02:39 -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: <20180706185750.b6h5cwif53zfieu7@alap3.anarazel.de> 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-03760-00331 X-Assp-Session: 7F24C8773570 (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 11:57 AM, Andres Freund wrote: > On 2018-07-06 14:49:53 -0400, Robert Haas wrote: >> I think we also have to ask ourselves in general whether snapshots of >> this data are worth what they cost. I don't think anyone would doubt >> that a consistent snapshot of the data is better than an inconsistent >> view of the data if the costs were equal. However, if we can avoid a >> huge amount of memory usage and complexity on large systems with >> hundreds of backends by ditching the snapshot requirement, then we >> should ask ourselves how important we think the snapshot behavior >> really is. > Indeed. I don't think it's worthwhile major additional memory or code > complexity in this situation. The likelihood of benefitting from more / > better stats seems far higher than a more accurate view of the stats - > which aren't particularly accurate themselves. They don't even survive > crashes right now, so I don't think the current accuracy is very high. 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? JD > > Greetings, > > Andres Freund > -- 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. *****