Re: Should we update the random_page_cost default value?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Tomas Vondra <tomas@vondra.me>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-06T05:53:05Z
Lists: 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