Skip to content

vchord 1.3.0

Latest

Choose a tag to compare

@Vonng Vonng released this 10 Nov 00:23

vchord 1.3.0 improves recovery, scan resource handling, numeric edge cases, and operational safety. The default vchordrq.epsilon remains 1.9.

Changes

  • Publish new RQ vector pages and graph vertex pages together with their incoming link in one WAL record before exposing free space. No disk-format change or per-page WAL flush.
  • Fix graph insertion's unaligned memory access, scan cleanup after errors/cancellation, and scan memory lifetimes inside SQL functions.
  • Improve bounded graph VACUUM repair and avoid unnecessary rewrites during no-op VACUUM. Exhausted graph insertion retries abort with SQLSTATE 40001 so applications can retry the transaction.
  • Restrict sampled query vectors to superusers and pg_read_all_stats. Sampling stays disabled by default; prewarm retains table privilege checks.
  • Defer ordinary DROP sample cleanup until commit and preserve samples on transaction/SAVEPOINT rollback.
  • Require schema-qualified external-build tables and provide actionable rebuild errors.
  • Correct RaBitQ cosine semantics and invalid-direction handling; retain compatible RaBitQ text/binary input for COPY and dump/restore.
  • Keep complete regular CI coverage while limiting default Valgrind runs to two small scan/error/cancellation regressions. Full Valgrind is explicitly opt-in and time-limited.

Install and upgrade

Assets cover PostgreSQL 14–18, x86_64/aarch64 Linux: ZIP archives, Debian packages, and individual SHA256 files. They are built on Ubuntu 22.04 and require glibc 2.35 or newer. pgvector is required. PostgreSQL 19 remains development validation only; no PG19 release packages are provided.

Install the library and SQL files for your PostgreSQL major version, ensure vchord is in shared_preload_libraries, restart PostgreSQL, and run in every database using the extension:

ALTER EXTENSION vchord UPDATE TO '1.3.0';
SELECT extversion FROM pg_extension WHERE extname = 'vchord';

Upgrades from 1.1.1 and 1.2.0 are supported and tested. Existing on-disk indexes are compatible, subject to these operational notes:

  • Rebuild cosine indexes created by 1.2.0 or earlier if they contain zero-norm or otherwise invalid directions. A catalog upgrade does not rewrite index pages.
  • Change legacy build.external.table values to schema.table before any index-rebuilding operation, including REINDEX, TRUNCATE, VACUUM FULL, CLUSTER, relevant column-type changes, and dump restore. Preserve the other index options.
  • Review permissions for sampled-query functions and the vchordrq_sampled_queries view.

Scope and remaining limitations

ANN recall after arbitrary deletion patterns is not guaranteed. Keep table autovacuum enabled, measure recall, and use REINDEX INDEX CONCURRENTLY when rebuilding is needed. Full crash-safe maintenance-page reclamation remains deferred; interrupted maintenance may leave unused pages.

Query samples are local, nontransactional diagnostics, not an audit log. Best-effort cleanup can retain unreachable samples after a crash or COMMIT PREPARED; concurrent DROP may clean samples at an internal commit, and concurrent REINDEX resets sample identity. Plain RaBitQ INSERT/COPY still does not enforce declared typmods; index dimensions are checked.

Validation

The release runtime was validated on macOS arm64/PG18 and Ubuntu 22.04 arm64/x86_64 with PostgreSQL 14–18, including SQL regressions, historical upgrades, package installation, Miri, controlled PG18 crash recovery, concurrent writes/reads, standby replay, and concurrent REINDEX. Controlled process-crash tests are not a power-loss certification. The final CI/README commit does not change runtime code; the long test matrix was not repeated for it. All ten tag-built PostgreSQL/architecture combinations additionally passed checksum, package-layout, installation, query and 1.1.1/1.2.0 catalog-upgrade smoke checks.

Release notes and migration details · Documentation · Full changelog