Re: Cost limited statements RFC - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Cost limited statements RFC
Date
Msg-id 519EAF10.2030405@2ndQuadrant.com
Whole thread Raw
In response to Re: Cost limited statements RFC  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-hackers
On 5/23/13 7:56 PM, Claudio Freire wrote:
> Besides of the obvious option of making a lighter check (doesn't have
> to be 100% precise), wouldn't this check be done when it would
> otherwise sleep? Is it so heavy still in that context?

A commit to typical 7200RPM disk is about 10ms, while 
autovacuum_vacuum_cost_delay is 20ms.  If the statement cost limit logic 
were no more complicated than commit_delay, it would be feasible to do 
something similar each time a statement was being put to sleep.

I suspect that the cheapest useful thing will be more expensive than 
commit_delay's test.  That's a guess though.  I'll have to think about 
this more when I circle back toward usability.  Thanks for the 
implementation idea.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Cost limited statements RFC
Next
From: Heikki Linnakangas
Date:
Subject: Re: Block write statistics WIP