From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Re: Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system |
Date: | 2016-03-19 00:38:30 |
Message-ID: | 24f09c2d-e5bf-1f73-db54-8255c1280d32@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 03/15/2016 03:04 AM, Noah Misch wrote:
> On Mon, Mar 14, 2016 at 01:33:08PM +0100, Tomas Vondra wrote:
>> On 03/14/2016 07:14 AM, Noah Misch wrote:
>>> On Mon, Mar 14, 2016 at 02:00:03AM +0100, Tomas Vondra wrote:
>>>> + * XXX Maybe this should also care about the clock skew, just like the
>>>> + * block a few lines down.
>>>
>>> Yes, it should. (The problem is large (>~100s), backward clock resets, not
>>> skew.) A clock reset causing "msg->clock_time < dbentry->stats_timestamp"
>>> will usually also cause "msg->cutoff_time < dbentry->stats_timestamp". Such
>>> cases need the correction a few lines down.
>>
>> I'll look into that. I have to admit I have a hard time reasoning about the
>> code handling clock skew, so it might take some time, though.
>
> No hurry; it would be no problem to delay this several months.
Attached is a patch that should fix the coalescing, including the clock
skew detection. In the end I reorganized the code a bit, moving the
check at the end, after the clock skew detection. Otherwise I'd have to
do the clock skew detection on multiple places, and that seemed ugly.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
pgstat-coalesce-v3.patch | binary/octet-stream | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2016-03-19 00:52:10 | Re: Parallel Aggregate |
Previous Message | David Rowley | 2016-03-19 00:35:59 | Re: Parallel Aggregate |