Re: shared-memory based stats collector

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: shared-memory based stats collector
Date: 2018-07-06 19:46:35
Message-ID: 97b73d3f-a093-1edd-624d-28ff548c4a80@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2018-07-06 20:03:12 Re: shared-memory based stats collector
Previous Message Andres Freund 2018-07-06 19:36:29 Re: shared-memory based stats collector