Re: (auto-)analyze causing bloat/load - Mailing list pgsql-hackers

From Andres Freund
Subject Re: (auto-)analyze causing bloat/load
Date
Msg-id 20141018183357.GH22660@awork2.anarazel.de
Whole thread Raw
In response to Re: (auto-)analyze causing bloat/load  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2014-10-18 14:30:53 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > Interestingly we already set PROC_IN_ANALYZE - but we never actually
> > look at it. I wonder what it'd take to ignore analyze in
> > GetSnapshotData()/GetOldestXmin()... At first sight it looks quite
> > doable to not have a snapshot around (or setup to be ignored) while
> > acquire_sample_rows() is running. As that's the expensive bit...
> 
> Say what?  How is ANALYZE supposed to know which rows are valid
> without a snapshot?

I haven't fully investigated it yet. But it's already not using it's own
snapshot to determine visibility. Instead it uses GetOldestXmin() +
HeapTupleSatisfiesVacuum().

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: (auto-)analyze causing bloat/load
Next
From: Tom Lane
Date:
Subject: Re: initdb failure on RH 5.10