diff --git a/pgxn/neon/communicator_new.c b/pgxn/neon/communicator_new.c index cc0a1634a7..bdd5a75d62 100644 --- a/pgxn/neon/communicator_new.c +++ b/pgxn/neon/communicator_new.c @@ -889,6 +889,9 @@ retry: elog(DEBUG1, "read from local cache file was superseded by concurrent update"); goto retry; } + + pgBufferUsage.file_cache.hits += nblocks; + return; } Assert(request_idx == my_next_slot_idx); @@ -898,6 +901,12 @@ retry: inflight_requests[num_inflight_requests] = request_idx; num_inflight_requests++; + /* + * XXX: If some blocks were in cache but not others, we count all blocks + * as a cache miss. + */ + pgBufferUsage.file_cache.misses += nblocks; + wait_request_completion(request_idx, &result); Assert(num_inflight_requests == 1); Assert(inflight_requests[0] == request_idx);