pg.ddx.io pgvector/pgvector GitHub issues and pull requestshelp / color / mirror / Atom feed
[pgvector/pgvector] issue #975: HNSW inserts can spend a long time on BufferIO after VACUUM due to insertPage rewinding to old reusable pages 3+ messages / 2 participants [nested] [flat]
* [pgvector/pgvector] issue #975: HNSW inserts can spend a long time on BufferIO after VACUUM due to insertPage rewinding to old reusable pages @ 2026-04-02 06:53 "cxyybless (@cxyybless)" <noreply+cxyybless@github.com> 0 siblings, 0 replies; 3+ messages in thread From: cxyybless (@cxyybless) @ 2026-04-02 06:53 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi, We are seeing a reproducible HNSW write-side latency issue that mainly shows up as `BufferIO` waits after `VACUUM` on a large index. For a large HNSW index, concurrent inserts after `VACUUM` can spend a long time waiting on `BufferIO` in `AddElementOnDisk()` / `ReadBufferExtended()`. From code reading and production observation, my current hypothesis is: - `VACUUM` identifies old reusable holes and effectively rewinds insertion toward old pages - subsequent inserts start probing from those old reusable pages - those pages are often cold / not resident - many backends converge on the same cold region - one backend starts buffer read I/O, and others block on the same buffer with `BufferIO` So this looks less like pure lock contention and more like **repeated convergence on cold reusable pages after vacuum**. ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #975: HNSW inserts can spend a long time on BufferIO after VACUUM due to insertPage rewinding to old reusable pages @ 2026-04-02 08:27 "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2026-04-02 08:27 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi @cxyybless, there isn't nearly enough info for this to be actionable / reproducible. ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #975: HNSW inserts can spend a long time on BufferIO after VACUUM due to insertPage rewinding to old reusable pages @ 2026-04-02 08:27 "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2026-04-02 08:27 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ankane closed this. ^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-04-02 08:27 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-04-02 06:53 [pgvector/pgvector] issue #975: HNSW inserts can spend a long time on BufferIO after VACUUM due to insertPage rewinding to old reusable pages "cxyybless (@cxyybless)" <noreply+cxyybless@github.com> 2026-04-02 08:27 ` "ankane (@ankane)" <noreply+ankane@github.com> 2026-04-02 08:27 ` "ankane (@ankane)" <noreply+ankane@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox