On Sun, Nov 26, 2017 at 3:19 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@gmail.com> writes: >> On Sat, Nov 25, 2017 at 12:09 PM, Tom Lane <t...@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