Re: (auto-)analyze causing bloat/load

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: (auto-)analyze causing bloat/load
Date: 2014-10-18 18:33:57
Message-ID: 20141018183357.GH22660@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-10-18 14:30:53 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-10-18 18:54:12 Re: initdb failure on RH 5.10
Previous Message Tom Lane 2014-10-18 18:30:53 Re: (auto-)analyze causing bloat/load