diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 71529a1..8984a1d 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -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);