Re: Query regarding pg_prewarm extension

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Jeremy Schneider <schneider(at)ardentperf(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Query regarding pg_prewarm extension
Date: 2024-12-30 17:38:27
Message-ID: Z3Lak9lbQ51LzBLi@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 30, 2024 at 10:54:21PM +0530, Ayush Vatsa wrote:
> When I initially read the documentation, I found it unclear how someone
> would practically use the range feature. For instance, how would a user
> determine the specific range of pages they need in the buffer cache?
> Since PostgreSQL doesn’t store data in a fixed order and the order can
> change over time due to operations like vacuum or updates, this could
> be confusing. Hence, an example illustrating the use case would be
> valuable.
>
> > Another equally legitimate use case would be if the user only wanted
> > to prewarm a subset of the relation... Actually, I'd imagine that's
> > probably more common than someone trying to speed this up by kicking
> > off multiple queries each with their own range.
>
> To me, using a range of pages to prewarm a relation doesn’t seem like a
> common use case. For example, if a user calls prewarm(100, 200),
> how would they decide those specific numbers? While it’s possible to
> inspect the contents of those pages, as Jeremy noted, users typically
> don’t track the location of specific rows for prewarming purposes.

Yeah, the ranage-of-blocks case is rare, and I hoped to explain it in
the docs, but it seems like that isn't helping, so I retract my patch.

--
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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2024-12-30 17:43:26 Re: Proposal: Progressive explain
Previous Message Shayon Mukherjee 2024-12-30 17:33:02 Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)