Diff in idx_tup_read and idx_tup_fetch in postgres pg_stat_all_indexes
idx_tup_read is increased whenever an index entry is read.
idx_tup_fetch is increased whenever an index scan fetches a table entry.
If your index-only scan increases idx_tup_fetch, it is not truly index-only. PostgreSQL had to fetch the table rows anyway just to check if they are visible or not, an information that is not stored in the index.
You can see that as &quot;heap tuples fetched&quot; in EXPLAIN (ANALYZE) output.
The solution is to VACUUM the table so that the visibility map gets updated.