Remove superfluous autoprewarm check

Melanie Plageman <melanieplageman@gmail.com>

Commit: 7f848cb788ee05b9a4896ad2e19b9ee724577439
Author: Melanie Plageman <melanieplageman@gmail.com>
Date: 2025-04-04T19:28:39Z
Releases: 18.0
Remove superfluous autoprewarm check

autoprewarm_database_main() prewarms blocks from the same database. It
is passed an array of sorted BlockInfoRecords and a start and stop index
into the array. The range represented should include only blocks
belonging to global objects or blocks from a single database. Remove an
unnecessary check that the current block is from the same database and
add an assert to ensure this invariant remains. Doing so removes a
special case that makes future refactoring to accommodate read
streamifying autoprewarm easier.

Noticed off-list by Andres Freund

Files

PathChange+/−
contrib/pg_prewarm/autoprewarm.c modified +3 −5