Re: shared-memory based stats collector - Mailing list pgsql-hackers

From Robert Haas
Subject Re: shared-memory based stats collector
Date
Msg-id CA+TgmoYbd9h3cisB_=p=ASg9o_vJm8rmW7VZs-TS0Mu947AxtQ@mail.gmail.com
Whole thread Raw
In response to Re: shared-memory based stats collector  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: shared-memory based stats collector  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: documentation fixes for partition pruning, round three
Next
From: Robert Haas
Date:
Subject: Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query