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 <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.