Index-only scan means the query can be answered from the index without reading table pages, because the index covers needed columns. Postgres still must know if rows are visible to the transaction; the visibility map tracks pages where all rows are visible, allowing the heap lookup to be skipped.