From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Better way of dealing with pgstat wait timeout during buildfarm runs? |
Date: | 2014-12-27 19:44:42 |
Message-ID: | 549F0C2A.3010303@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/27/2014 12:16 AM, Alvaro Herrera wrote:
> Tom Lane wrote:
>
>> The argument that autovac workers need fresher stats than anything else
>> seems pretty dubious to start with. Why shouldn't we simplify that down
>> to "they use PGSTAT_STAT_INTERVAL like everybody else"?
>
> The point of wanting fresher stats than that, eons ago, was to avoid a
> worker vacuuming a table that some other worker vacuumed more recently
> than PGSTAT_STAT_INTERVAL. I realize now that the semantics we really
> want was something like "stats no older than XYZ" where the given value
> is the timestamp at which we start checking; if we get anything newer
> than that it would be okay, but we currently reject it because of lack
> of a more appropriate API. (If it takes more than PGSTAT_STAT_INTERVAL
> to get the stats back, a regular backend would ask for fresher stats,
> but to an autovac worker they would be good enough as long as they are
> newer than its recheck start time.)
>
> Nowadays we can probably disregard the whole issue, since starting a new
> vacuum just after the prior one finished should not cause much stress to
> the system thanks to the visibility map.
Vacuuming is far from free, even if the visibility map says that most
pages are visible to all: you still scan all indexes, if you remove any
dead tuples at all.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2014-12-27 19:48:04 | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
Previous Message | Tom Lane | 2014-12-27 18:02:04 | Re: CATUPDATE confusion? |