pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #918: HNSW scan lock as optional parameter
5+ messages / 2 participants
[nested] [flat]
* [pgvector/pgvector] issue #918: HNSW scan lock as optional parameter
@ 2025-11-04 15:35 "detrin (@detrin)" <noreply+detrin@github.com>
0 siblings, 0 replies; 5+ messages in thread
From: detrin (@detrin) @ 2025-11-04 15:35 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Looking into https://www.postgresql.org/docs/current/runtime-config-locks.html and https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.Parameters... there are no optional parameters that would allow to disable the page lock during scan and partial scan.
Why should we even bother with that? Well, looking into the codebase, if I understand it correctly, during multiple concurrent scans, the lock table becomes a bottleneck. What if deletion and updates are rather infrequent? Could we make this locking during scans optional?
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #918: HNSW scan lock as optional parameter
@ 2025-11-04 18:52 ` "ankane (@ankane)" <noreply+ankane@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: ankane (@ankane) @ 2025-11-04 18:52 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @detrin, see https://github.com/pgvector/pgvector/issues/766#issuecomment-2745409242.
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #918: HNSW scan lock as optional parameter
@ 2025-11-04 18:52 ` "ankane (@ankane)" <noreply+ankane@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: ankane (@ankane) @ 2025-11-04 18:52 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #918: HNSW scan lock as optional parameter
@ 2025-11-04 19:36 ` "detrin (@detrin)" <noreply+detrin@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: detrin (@detrin) @ 2025-11-04 19:36 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane
> At this point, I don't think there's anything for pgvector to do here. It seems like this behavior may be limited to low-dimensional vectors with a very low ef_search.
1) I am not using low dimensional vector, it is 300+ dims (dense vectors)
2) ef_search is also not very low with setting it to 200.
When the number of high concurrent scans are running, this starts to be an issue, and I am getting timeouts. I suspect the page lock is the bottleneck here. I don't think the comment you mentioned is relevant.
^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #918: HNSW scan lock as optional parameter
@ 2025-11-04 20:59 ` "ankane (@ankane)" <noreply+ankane@github.com>
3 siblings, 0 replies; 5+ messages in thread
From: ankane (@ankane) @ 2025-11-04 20:59 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
It's very unlikely this is due to the (shared) scan lock (as removing it didn't affect QPS, even for higher dimensional vectors), but feel free to share if you have more evidence.
^ permalink raw [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-11-04 20:59 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04 15:35 [pgvector/pgvector] issue #918: HNSW scan lock as optional parameter "detrin (@detrin)" <noreply+detrin@github.com>
2025-11-04 18:52 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-11-04 18:52 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-11-04 19:36 ` "detrin (@detrin)" <noreply+detrin@github.com>
2025-11-04 20:59 ` "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