Re: [HACKERS] More stats about skipped vacuums - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] More stats about skipped vacuums
Date
Msg-id CA+TgmoZUjVh=R-9+ThtvZMNEsxbeASySJ2JER2+3B1bUeDabbg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] More stats about skipped vacuums  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] More stats about skipped vacuums  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Sun, Nov 26, 2017 at 3:19 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Mumble.  It's a property I'm pretty hesitant to give up, especially
>>> since the stats views have worked like that since day one.  It's
>>> inevitable that weakening that guarantee would break peoples' queries,
>>> probably subtly.
>
>> You mean, queries against the stats views, or queries in general?  If
>> the latter, by what mechanism would the breakage happen?
>
> Queries against the stats views, of course.

Hmm.  Those are probably rare.  If we only took a snapshot of the
statistics for the backends that explicitly access those views, that
probably wouldn't be too crazy.

Sorry if this is a stupid question, but how often and for what purpose
to regular backends need the stats collector data for purposes other
than querying the stats views?  I thought that the data was only used
to decide whether to VACUUM/ANALYZE, and therefore would be accessed
mostly by autovacuum, and for that you'd actually want the most
up-to-date view of the stats for a particular table that is available,
not any older snapshot.

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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] More stats about skipped vacuums
Next
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA