Skip to content

[BUG] vchord extension default_version is "0.0.0" instead of actual version in deb package #1

@moonD4rk

Description

@moonD4rk

Problem

The postgresql-17-vchord deb package (version 1.1.0-1PIGSTY~noble) ships with incorrect extension metadata. The vchord.control file has default_version = '0.0.0' and only contains a single vchord--0.0.0.sql file, instead of the actual version 1.1.0.

This means CREATE EXTENSION vchord; installs version 0.0.0, and there is no upgrade path available.

Reproduction

# Install from Pigsty apt repo
apt install postgresql-17-vchord=1.1.0-1PIGSTY~noble

# Check control file
cat /usr/share/postgresql/17/extension/vchord.control
# Output:
# comment = 'vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM'
# default_version = '0.0.0'   <-- should be '1.1.0'
# module_pathname = 'vchord'
# relocatable = true
# superuser = true
# requires = 'vector'

# Check SQL files
ls /usr/share/postgresql/17/extension/vchord--*.sql
# Output:
# /usr/share/postgresql/17/extension/vchord--0.0.0.sql   <-- only this one file

Comparison with Official Package

The official TensorChord package (1.1.1-1) has the correct version:

# control: default_version = '1.1.1'
# SQL files: vchord--1.1.1.sql + full upgrade chain (0.1.0→0.2.0→...→1.1.1)

Root Cause

VectorChord's upstream Cargo.toml hardcodes the workspace version as 0.0.0:

# https://github.com/tensorchord/VectorChord/blob/1.1.0/Cargo.toml
[workspace.package]
version = "0.0.0"

The official TensorChord release CI dynamically injects the correct version during build. The Pigsty build scripts (debian/rules and the corresponding RPM spec) do not perform this substitution, so cargo pgrx package produces artifacts with 0.0.0.

Note: This issue likely also affects the RPM packages (pgsty/rpm), as the same cargo pgrx package command is used without version substitution.

Docker Reproduction (Verified)

Tested with a clean ubuntu:24.04 container:

docker run --rm -it ubuntu:24.04 bash

# Add PGDG + Pigsty repos, then install
apt install postgresql-17 postgresql-17-pgvector postgresql-17-vchord

Result 1 — Package version vs extension version mismatch:

$ dpkg -l | grep vchord
ii  postgresql-17-vchord  1.1.0-1PIGSTY~noble  arm64  ...

$ cat /usr/share/postgresql/17/extension/vchord.control
default_version = '0.0.0'    # <-- should be '1.1.0'

$ ls /usr/share/postgresql/17/extension/vchord--*.sql
vchord--0.0.0.sql             # <-- only this one file, no upgrade chain

Result 2 — Extension installs as 0.0.0, no upgrade path:

postgres=# CREATE EXTENSION vchord;
CREATE EXTENSION

postgres=# SELECT extname, extversion FROM pg_extension WHERE extname = 'vchord';
 extname | extversion
---------+------------
 vchord  | 0.0.0

postgres=# SELECT name, version FROM pg_available_extension_versions WHERE name = 'vchord';
  name  | version
--------+---------
 vchord | 0.0.0

postgres=# ALTER EXTENSION vchord UPDATE TO '1.1.0';
ERROR:  extension "vchord" has no update path from version "0.0.0" to version "1.1.0"

Environment

  • OS: Ubuntu 24.04 (noble) — verified in Docker ubuntu:24.04
  • Package: postgresql-17-vchord 1.1.0-1PIGSTY~noble
  • Source: https://repo.pigsty.io/apt/pgsql/noble

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions