| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(at)vondra(dot)me>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Should we update the random_page_cost default value? |
| Date: | 2025-10-31 15:41:12 |
| Message-ID: | aQTYmMa2oNrB8blI@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Oct 30, 2025 at 07:13:01PM -0400, Bruce Momjian wrote:
> On Thu, Oct 9, 2025 at 08:05:37AM -0400, Robert Haas wrote:
> > On Wed, Oct 8, 2025 at 8:16 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > I rewrote the random_page_cost docs, attached, to remove a focus on
> > > magnetic disk, and added network latency as a reason for
> > > random_page_cost being low. I removed the specific caching numbers and
> > > went with a more generic description.
> > >
> > > I would normally apply this only to master, but given the complaints in
> > > this thread, maybe I should backpatch it.
> >
> > This seems fine to me but I won't be surprised if other people have
> > some complaints. :-)
>
> Doc patch applied to all supported releases.
I thinking more about how we can improve random_page_cost, I now realize
that we will never perfectly model the caching effects, and even if we
did, the possible time gap between planning and execution would rander
it unreliable anyway, i.e., prepared queries.
I think the best we could do is to model how _volatile_ the cache is,
meaning how often are we removing and adding items to the shared buffer
cache, and somehow mix that to the random_page_cost value. That value
might be fairly stable over a longer period of time.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dmitry Koval | 2025-10-31 15:41:14 | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
| Previous Message | Jim Jones | 2025-10-31 15:36:24 | Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement |