pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: shared-memory based stats collector
Date: Fri, 6 Jul 2018 12:46:35 -0700
Message-ID: <97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com> (raw)
In-Reply-To: <CA+TgmoYbd9h3cisB_=p=ASg9o_vJm8rmW7VZs-TS0Mu947AxtQ@mail.gmail.com>
References: <20180629.173418.190173462.horiguchi.kyotaro@lab.ntt.co.jp>
	<CA+TgmoYQhr30eAcgJCi1v0FhA+3RP1FZVnXqSTLe=6fHy9e5oA@mail.gmail.com>
	<20180703.190144.222427588.horiguchi.kyotaro@lab.ntt.co.jp>
	<67470.1530739431@sss.pgh.pa.us>
	<CABUevEwXO-8so0gpkz2C-rExaVJcioi-wj-R9nf+F9Yr3He2uw@mail.gmail.com>
	<CA+TgmoZz9wHf08Ww8d7uQbGJ8CFzkv4KnP23ZYV312_VJS=Fog@mail.gmail.com>
	<20180706185750.b6h5cwif53zfieu7@alap3.anarazel.de>
	<608c6c72-96ef-f002-65fe-6889cc37db99@commandprompt.com>
	<CA+TgmoYbd9h3cisB_=p=ASg9o_vJm8rmW7VZs-TS0Mu947AxtQ@mail.gmail.com>

On 07/06/2018 12:34 PM, Robert Haas wrote:
> On Fri, Jul 6, 2018 at 3:02 PM, Joshua D. Drake <jd@commandprompt.com> 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.   *****





view thread (238+ messages)  latest in thread

Message-ID: <97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com>
Permalink:  ../97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com/
Also on:    postgresql.org/message-id/97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: jd@commandprompt.com, robertmhaas@gmail.com, andres@anarazel.de, magnus@hagander.net, tgl@sss.pgh.pa.us, horiguchi.kyotaro@lab.ntt.co.jp
  Subject: Re: shared-memory based stats collector
  In-Reply-To: <97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox