Skip to content

vectorchord

Version 2026.144.1531
Repo superproject

VectorChord vector-search extension installed into the PostgreSQL layer VectorChord (vchord) is a PostgreSQL extension for vector similarity search. This candy downloads the per-Postgres-major release zip and installs the vchord.so shared library into the server’s pkglibdir plus the vchord.control manifest and vchord–*.sql migration files into the extension sharedir, then sets POSTGRES_SHARED_PRELOAD_LIBRARIES=vchord.so so the running server preloads it. The control manifest and shared library are concrete, distro-agnostic artifacts whose presence proves the download-and-install ran; CREATE EXTENSION vchord against the live server proves it is actually loadable.

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
run command=PG_MAJOR=$(postgres –version | awk ‘{print $NF}’ | cut -d. -f1) PKGLIBDIR=$(dirname “$(find /usr/lib* -name plpgsql.so -print -quit 2>/dev/null)”) SHAREDIR=“” for d in /usr/share/pgsql /usr/share/postgresql; do [ -d “$d/extension” ] && SHAREDIR=“$d” && break done if [ -z “$PKGLIBDIR” ] || [ ! -d “$PKGLIBDIR” ]; then echo “Error: Could not detect PostgreSQL pkglibdir (plpgsql.so not found)” >&2 exit 1 fi if [ ! -d “$SHAREDIR/extension” ]; then echo “Error: PostgreSQL sharedir not found at $SHAREDIR/extension” >&2 exit 1 fi echo “Detected PostgreSQL ${PG_MAJOR}: pkglibdir=${PKGLIBDIR}, sharedir=${SHAREDIR}” VCHORD_URL=“https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_VERSION}/postgresql-${PG_MAJOR}-vchord_${VCHORD_VERSION}_${BUILD_ARCH}-linux-gnu.zip” echo “Downloading VectorChord ${VCHORD_VERSION} for PostgreSQL ${PG_MAJOR} (${BUILD_ARCH})…” curl -fsSL “$VCHORD_URL” -o /tmp/vchord.zip cd /tmp unzip -q vchord.zip cp /tmp/pkglibdir/vchord.so “$PKGLIBDIR/” chmod 755 “$PKGLIBDIR/vchord.so” cp /tmp/sharedir/extension/vchord.control “$SHAREDIR/extension/” cp /tmp/sharedir/extension/vchord–*.sql “$SHAREDIR/extension/” rm -rf /tmp/vchord.zip /tmp/pkglibdir /tmp/sharedir echo “VectorChord ${VCHORD_VERSION} installed:” ls -la “$PKGLIBDIR/vchord.so” ls “$SHAREDIR/extension/vchord.control”
check the vchord.control extension manifest is registered in the PostgreSQL extension sharedir
check the vchord.so shared library is installed alongside the server’s plpgsql.so in pkglibdir
agent-check CREATE EXTENSION vchord succeeds against the running PostgreSQL server, exposing the vchord vector index access methods
check command=printenv POSTGRES_SHARED_PRELOAD_LIBRARIES