pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: xcu (@xcu) <noreply+xcu@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #840: Support for index rollout
Date: Mon, 19 May 2025 18:24:12 +0000
Message-ID: <gh-pgvector-pgvector-840-c2891923267@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-840@github.com>
References: <gh-pgvector-pgvector-840@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. 

view thread (5+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-840-c2891923267@github.com>
Permalink:  ../gh-pgvector-pgvector-840-c2891923267@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