Re: Should we update the random_page_cost default value? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Should we update the random_page_cost default value?
Date
Msg-id 1863258.1759729985@sss.pgh.pa.us
Whole thread Raw
In response to Re: Should we update the random_page_cost default value?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Should we update the random_page_cost default value?
Re: Should we update the random_page_cost default value?
List pgsql-hackers
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Mon, 2025-10-06 at 01:29 -0400, Tom Lane wrote:
>> But if what
>> we're trying to model is net resource demands, with an eye to
>> minimizing the total system load not execution time of any one query,
>> maybe we can continue to work with something close to what we've
>> traditionally done.

> Did anybody propose that?

I just did ;-).  If we don't adopt a mindset along that line,
then AIO is going to require some *radical* changes in the
planner's I/O cost models.

> I was under the impression that PostgreSQL's cost model tries to
> estimate and optimize execution time, not resource consumption.

Yup, that's our traditional view of it.  But I wonder how we
will make such estimates in a parallel-I/O world, especially
if we don't try to account for concurrent query activity.
(Which is a place I don't want to go, because it would render
planning results utterly irreproducible.)

> But perhaps I misunderstood, or perhaps I am just too conservative.

I'm normally pretty conservative also about changing planner
behavior.  But in this context I think we need to be wary of
thinking too small.  The fact that people keep coming out with
different ideas of what random_page_cost needs to be suggests
that there's something fundamentally wrong with the concept.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Should we update the random_page_cost default value?
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables