From d1ff09b32c151e88bde347a82b31d6eaab31700b Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 25 Jun 2026 23:26:29 +0000 Subject: [PATCH] chore(docker): pin pg_textsearch to v1.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image built pg_textsearch from the moving main branch, shipping an unreproducible "1.0.0-dev". That dev build's bm25 access method could wedge an INSERT on a buffer-content lock indefinitely (uninterruptible — only a Postgres restart cleared it), holding the relation lock and stalling every other operation on the collection. Pin to the latest tagged release (v1.3.1, same 1.x major as what was deployed, so the bm25 SQL stays compatible) via a shallow tag clone, and expose PG_TEXTSEARCH_VERSION as a build arg for deliberate future bumps. Signed-off-by: Ettore Di Giacinto Assisted-by: Claude:claude-opus-4-8 [Claude Code] --- Dockerfile.pgsql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile.pgsql b/Dockerfile.pgsql index b3f2f6a..4ea4a40 100644 --- a/Dockerfile.pgsql +++ b/Dockerfile.pgsql @@ -57,8 +57,12 @@ RUN apt-get install -y \ # Ensure PostgreSQL binaries are in the PATH ENV PATH="/usr/lib/postgresql/18/bin:${PATH}" -# Build and install pg_textsearch extension -RUN git clone https://github.com/timescale/pg_textsearch /tmp/pg_textsearch && \ +# Build and install pg_textsearch extension (provides the bm25 access method). +# Pin to a tagged release: building from the moving main branch shipped an +# unreproducible "1.0.0-dev" whose bm25 index could wedge INSERTs on a +# buffer-content lock and stall the whole vector store. Bump deliberately. +ARG PG_TEXTSEARCH_VERSION=v1.3.1 +RUN git clone --depth 1 --branch "${PG_TEXTSEARCH_VERSION}" https://github.com/timescale/pg_textsearch /tmp/pg_textsearch && \ cd /tmp/pg_textsearch && \ make && \ make install && \