Re: Should we update the random_page_cost default value?

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tomas Vondra <tomas@vondra.me>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-06T08:54:03Z
Lists: pgsql-hackers
On Mon, 2025-10-06 at 01:53 -0400, Tom Lane wrote:
> 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 see your point, and actually the idea of the planner targeting
the lowest resource usage ist quite attractive.  That is, in a
situation where you want to optimize throughput.  I regularly
find myself advising users that if their CPU load is approaching
100%, they had better disable parallel query.

But I am afraid that that would pessimize plans for analytical
queries, where your sole goal is a low response time.

This is far from a serious proposal, but perhaps there could be
a parameter "optimizer_goal" with values "throughput", "response_time"
and "mixed" that determines the default value for other parameters...

Yours,
Laurenz Albe