apps(osint): pg image r3 for timescaledb 2.32.1 on PG 16.16

PG 16.16 added the PortalDrop() "cannot drop portal" check that
TimescaleDB <=2.32.0 trips from the background scheduler, so every policy
job (refresh/compression/retention/job history) failed with SQLSTATE 24000
although CALL run_job() worked (timescale/timescaledb#11038, fixed in
2.32.1).

Rebuilt apps/base/osint/pg-image/Dockerfile with:
- base postgres:16.16-bookworm (was floating 16-bookworm)
- timescaledb-2-postgresql-16 / -2-loader-postgresql-16 pinned to
  2.32.1~debian12-1616 (built against PG 16.16)

Pushed as amd64-c48788d4b614-r3 (digest sha256:b2bdc093...), verified by a
throwaway restore of a fresh pg_dump: extension 2.32.0 -> ALTER EXTENSION
UPDATE 2.32.1 -> all 12 jobs Success with real last_successful_finish and
no portal errors.
This commit is contained in:
Lance Walters 2026-11-21 17:13:54 -05:00
commit e63c14641d
3 changed files with 32 additions and 9 deletions

View file

@ -1,19 +1,32 @@
# Cluster build of the OSINT Postgres image (amd64).
#
# Identical to `Dockerfile.pg` in sirius/osint-dashboard EXCEPT the base image
# is pinned to bookworm. The upstream `FROM postgres:16` now resolves to Debian
# trixie, where postgresql-16-postgis-3 (3.7.0+pgdg13) fails to load against
# PostgreSQL 16.15:
# is pinned to Debian bookworm AND to the 16.16 minor. The upstream file's bare
# `FROM postgres:16` now resolves to Debian trixie, where
# postgresql-16-postgis-3 (3.7.0+pgdg13) fails to load against PostgreSQL 16.15:
# could not load library "/usr/lib/postgresql/16/lib/postgis-3.so":
# undefined symbol: heap_datum_check
# On bookworm (+pgdg12) both extensions load and create_hypertable() works.
FROM postgres:16-bookworm
#
# PostgreSQL minor and the TimescaleDB package build MUST match. TimescaleDB
# publishes one .so per PG minor (the packagecloud suffix `-1616` means built
# against 16.16). PostgreSQL 16.16/17.12/18.7 added the PortalDrop() "while it
# is being set up" check, which the <=2.32.0 background scheduler trips on, so
# every policy job fails with `cannot drop portal ""` (timescale#11038, fixed
# in 2.32.1). Both halves are pinned here so a rebuild cannot silently drift
# back onto a mismatched pair.
#
# Resulting versions: PostgreSQL 16.16, postgis 3.7.0, timescaledb 2.32.1.
# After a pod recreate run `ALTER EXTENSION timescaledb UPDATE TO '2.32.1'`.
FROM postgres:16.16-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl gnupg lsb-release && \
curl -fsSL https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | bash && \
apt-get update && apt-get install -y --no-install-recommends \
postgresql-16-postgis-3 timescaledb-2-postgresql-16 && \
postgresql-16-postgis-3 \
timescaledb-2-postgresql-16=2.32.1~debian12-1616 \
timescaledb-2-loader-postgresql-16=2.32.1~debian12-1616 && \
mkdir -p /etc/postgresql/16/main/conf.d && \
echo "shared_preload_libraries = 'timescaledb'" > /etc/postgresql/16/main/conf.d/timescaledb.conf && \
rm -rf /var/lib/apt/lists/*