From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: Better way of dealing with pgstat wait timeout during buildfarm runs? |
Date: | 2015-01-18 23:48:41 |
Message-ID: | 20150118234841.GA3111884@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Jan 18, 2015 at 04:09:29PM -0500, Tom Lane wrote:
> Noah Misch <noah(at)leadboat(dot)com> writes:
> > On Sat, Dec 27, 2014 at 07:55:05PM -0500, Tom Lane wrote:
> >> Or, much more simply, we could conclude that it's not that important
> >> if pgstat_vacuum_stat() is unable to get up-to-date stats, and rejigger
> >> the code so that we don't bleat when the file-reading request comes from
> >> that source. This should be a back-patchable fix, whereas #2 above might
> >> be a bit too complicated for that.
>
> > This, however, feels like a clear improvement. When every VACUUM does
> > pgstat_vacuum_stat(), it doesn't matter if any given VACUUM misses removing
> > entries that became obsolete in the preceding second or so. In fact, rather
> > than merely not bleating when the wait times out, let's not wait at all. I
> > don't favor VACUUM of a small table taking 12s because it spent 2s on the
> > table and 10s waiting to garbage collect a piping-hot stats file.
>
> I think that would be going too far: if an autovac wakes up in the dead of
> night, it should not use an ancient stats file merely because no one else
> has asked for stats recently. But if it never waits at all, it'll be
> at the mercy of whatever is already on disk.
Whoops; I underestimated the upper bound on time between stats file writes.
> After looking at the code, the minimum-change alternative would be more or
> less as attached: first, get rid of the long-obsolete proposition that
> autovacuum workers need fresher-than-usual stats; second, allow
> pgstat_vacuum_stat to accept stats that are moderately stale (the number
> given below allows them to be up to 50 seconds old); and third, suppress
> wait-timeout warnings when the call is from pgstat_vacuum_stat. The third
> point is what we need to avoid unnecessary buildfarm failures. The second
> point addresses the idea that we don't need to stress the stats collector
> too much for this.
Only #3 belongs in a minimum-change patch. #1 and #2 solve and/or create
different problems and operate independently of #3. A patch covering #3 alone
sounds attractive.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2015-01-19 00:00:34 | Re: [REVIEW] Re: Fix xpath() to return namespace definitions |
Previous Message | Michael Paquier | 2015-01-18 23:48:26 | Re: Reducing buildfarm disk usage: remove temp installs when done |