pg.ddx.io pgvector/pgvector GitHub issues and pull requestshelp / color / mirror / Atom feed
[pgvector/pgvector] issue #840: Support for index rollout 5+ messages / 3 participants [nested] [flat]
* [pgvector/pgvector] issue #840: Support for index rollout @ 2025-05-19 13:40 "xcu (@xcu)" <noreply+xcu@github.com> 0 siblings, 0 replies; 5+ messages in thread From: xcu (@xcu) @ 2025-05-19 13:40 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Right now rolling out a new index can be fairly dangerous on production environments, especially for large indexes. ANN indexes need to be in memory to perform well, otherwise performance can drop substantially until the new index is brought to memory (as in, a couple of orders of magnitude). This can take several minutes if the index is large. If you are using partman this can be fixed by rolling one partition at a time, waiting some seconds for the new index to be brought to memory, then moving on to the next partition. Is there any similar approach being considered for pgvector? If not, do you think it would make sense for an extension to do this? Because if it does I think I might try to implement it. ^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #840: Support for index rollout @ 2025-05-19 14:02 ` "jkatz (@jkatz)" <noreply+jkatz@github.com> 3 siblings, 0 replies; 5+ messages in thread From: jkatz (@jkatz) @ 2025-05-19 14:02 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @xcu If you've created a partitioned table, loaded your rows (vectors) into it, and then run `CREATE INDEX ...` on the root partition, PostgreSQL will incrementally build the index on each partition. I realize what you say is slightly different, but wanted to throw that out there. So my 2ยข - I'd say this is likely an external tool for the time being - though it does sound useful and mirrors how I've done some larger scale tests! ^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #840: Support for index rollout @ 2025-05-19 18:24 ` "xcu (@xcu)" <noreply+xcu@github.com> 3 siblings, 0 replies; 5+ messages in thread From: xcu (@xcu) @ 2025-05-19 18:24 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @jkatz problem with that is that partman allows you to run CREATE INDEX on the root partition, but not CREATE INDEX CONCURRENTLY, which makes it an issue on prod systems as it acquires a access exclusive lock on the table. Instead, what I usually do is running CREATE INDEX CONCURRENTLY on each partition, then CREATE INDEX on the parent (this just take a few ms and works fine). I coded a solution in Python that pretty much automates this, while also dropping the old index or just setting indisvalid = true in pg_index. However, I was thinking it might be more useful as an actual extension, but I have no experience developing Postgres extensions and I don't know if it's a good usecase for it. ^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #840: Support for index rollout @ 2025-05-22 23:45 ` "ankane (@ankane)" <noreply+ankane@github.com> 3 siblings, 0 replies; 5+ messages in thread From: ankane (@ankane) @ 2025-05-22 23:45 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi @xcu, I think scripting this (like you already did) is the simplest approach. ^ permalink raw [nested|flat] 5+ messages in thread
* Re: [pgvector/pgvector] issue #840: Support for index rollout @ 2025-05-22 23:45 ` "ankane (@ankane)" <noreply+ankane@github.com> 3 siblings, 0 replies; 5+ messages in thread From: ankane (@ankane) @ 2025-05-22 23:45 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ankane closed this. ^ permalink raw [nested|flat] 5+ messages in thread
end of thread, other threads:[~2025-05-22 23:45 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-05-19 13:40 [pgvector/pgvector] issue #840: Support for index rollout "xcu (@xcu)" <noreply+xcu@github.com> 2025-05-19 14:02 ` "jkatz (@jkatz)" <noreply+jkatz@github.com> 2025-05-19 18:24 ` "xcu (@xcu)" <noreply+xcu@github.com> 2025-05-22 23:45 ` "ankane (@ankane)" <noreply+ankane@github.com> 2025-05-22 23:45 ` "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