just precache the target index

This commit is contained in:
peitingwei 2023-03-29 19:08:38 +08:00
parent a5698c60bc
commit 7c34503e33

View File

@ -792,7 +792,7 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,
*/
pgstat_count_buffer_read(reln);
/* precache index */
if (isPreCacheIndex)
if (isPreCacheIndex && preCacheIndexNode == reln->rd_node->relNode)
{
BlockNumber precacheblocks;
precacheblocks = smgrnblocks(eln->rd_smgr, forkNum);