Re: Query regarding pg_prewarm extension - Mailing list pgsql-hackers

From Ayush Vatsa
Subject Re: Query regarding pg_prewarm extension
Date
Msg-id CACX+KaNb9VuaLGt0Up14Y-g6+KbAv9ZESr9VagAEdLKvFYVagQ@mail.gmail.com
Whole thread Raw
In response to Re: Query regarding pg_prewarm extension  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Query regarding pg_prewarm extension
Re: Query regarding pg_prewarm extension
List pgsql-hackers
> hmm, do we really need to highlight one specific usage for the range
> like this? I think mentioning this could just confuse readers as it
> makes it sound like using a range is going to magically run something
> in parallel.

I believe highlighting that particular use case would indeed be helpful,
but not directly through a change in the documentation. Instead, it
could be better conveyed through an example.

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.

Regards,
Ayush Vatsa
AWS Aurora

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RFC: Allow EXPLAIN to Output Page Fault Information
Next
From: Bruce Momjian
Date:
Subject: Re: Query regarding pg_prewarm extension