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:
parent
2380cfb6ac
commit
e63c14641d
3 changed files with 32 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ instead of a host Docker container on the Pi.
|
||||||
|
|
||||||
| Deployment | Image | Purpose |
|
| Deployment | Image | Purpose |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `osint-db` | `forgejo…/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2` | TimescaleDB 2 + PostGIS 3 on Postgres 16, `local-path` PVC `osint-pgdata` 15 Gi |
|
| `osint-db` | `forgejo…/sirius/osint-dashboard-pg:amd64-c48788d4b614-r3` | TimescaleDB 2.32.1 + PostGIS 3 on Postgres 16.16, `local-path-linode` PVC `osint-pgdata-linode` 15 Gi |
|
||||||
| `osint-nats` | `forgejo…/sirius/nats:2.10` | JetStream event bus (`-js -m 8222`) |
|
| `osint-nats` | `forgejo…/sirius/nats:2.10` | JetStream event bus (`-js -m 8222`) |
|
||||||
| `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-915f6cbe25be` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations |
|
| `osint-app` | `forgejo…/sirius/osint-dashboard:amd64-915f6cbe25be` | FastAPI + static HUD; runs `alembic upgrade heads` on start; single-admin auth (`app/auth.py`) — public read-only site, admin-only keys/settings/mutations |
|
||||||
| `osint-ingester` | same app image | RSS/GDELT/USGS/FIRMS/vessel ingest → NATS → Postgres |
|
| `osint-ingester` | same app image | RSS/GDELT/USGS/FIRMS/vessel ingest → NATS → Postgres |
|
||||||
|
|
@ -56,13 +56,23 @@ docker build -f pg-image/Dockerfile -t 127.0.0.1:3000/sirius/osint-das
|
||||||
```
|
```
|
||||||
|
|
||||||
`pg-image/Dockerfile` is the cluster copy of `Dockerfile.pg`. **It pins
|
`pg-image/Dockerfile` is the cluster copy of `Dockerfile.pg`. **It pins
|
||||||
`postgres:16-bookworm`**: the upstream file's bare `postgres:16` now resolves to
|
`postgres:16.16-bookworm`**: the upstream file's bare `postgres:16` now resolves
|
||||||
Debian trixie, whose `postgresql-16-postgis-3` (3.7.0+pgdg13) fails to load
|
to Debian trixie, whose `postgresql-16-postgis-3` (3.7.0+pgdg13) fails to load
|
||||||
against PG 16.15 with `undefined symbol: heap_datum_check` — `CREATE EXTENSION
|
against PG 16.15 with `undefined symbol: heap_datum_check` — `CREATE EXTENSION
|
||||||
postgis` crashes the server. On bookworm (`+pgdg12`) PostGIS 3.7 loads and
|
postgis` crashes the server. On bookworm (`+pgdg12`) PostGIS 3.7 loads and
|
||||||
`create_hypertable()` works. Port the one-line base-image pin upstream when the
|
`create_hypertable()` works. Port the one-line base-image pin upstream when the
|
||||||
Pi stack is next rebuilt.
|
Pi stack is next rebuilt.
|
||||||
|
|
||||||
|
It also pins the TimescaleDB packages to `2.32.1~debian12-1616` (the `-1616`
|
||||||
|
suffix = built against PG 16.16) and the base image to the 16.16 minor. PG
|
||||||
|
16.16 added the `PortalDrop()` "cannot drop portal while it is being set up"
|
||||||
|
check that TimescaleDB <=2.32.0 trips in its background-worker path, so every
|
||||||
|
policy job failed with SQLSTATE 24000 while `CALL run_job()` worked
|
||||||
|
(timescale/timescaledb#11038, fixed in 2.31.2/2.32.1). Never unpin either half:
|
||||||
|
a pg minor bump without a matching TimescaleDB build reintroduces the failure.
|
||||||
|
`-r3` is that build. After a pod recreate the extension itself still has to be
|
||||||
|
moved: `ALTER EXTENSION timescaledb UPDATE TO '2.32.1'`.
|
||||||
|
|
||||||
## Secrets (never in git)
|
## Secrets (never in git)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,32 @@
|
||||||
# Cluster build of the OSINT Postgres image (amd64).
|
# Cluster build of the OSINT Postgres image (amd64).
|
||||||
#
|
#
|
||||||
# Identical to `Dockerfile.pg` in sirius/osint-dashboard EXCEPT the base image
|
# 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
|
# is pinned to Debian bookworm AND to the 16.16 minor. The upstream file's bare
|
||||||
# trixie, where postgresql-16-postgis-3 (3.7.0+pgdg13) fails to load against
|
# `FROM postgres:16` now resolves to Debian trixie, where
|
||||||
# PostgreSQL 16.15:
|
# 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":
|
# could not load library "/usr/lib/postgresql/16/lib/postgis-3.so":
|
||||||
# undefined symbol: heap_datum_check
|
# undefined symbol: heap_datum_check
|
||||||
# On bookworm (+pgdg12) both extensions load and create_hypertable() works.
|
# 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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates curl gnupg lsb-release && \
|
ca-certificates curl gnupg lsb-release && \
|
||||||
curl -fsSL https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | bash && \
|
curl -fsSL https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | bash && \
|
||||||
apt-get update && apt-get install -y --no-install-recommends \
|
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 && \
|
mkdir -p /etc/postgresql/16/main/conf.d && \
|
||||||
echo "shared_preload_libraries = 'timescaledb'" > /etc/postgresql/16/main/conf.d/timescaledb.conf && \
|
echo "shared_preload_libraries = 'timescaledb'" > /etc/postgresql/16/main/conf.d/timescaledb.conf && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ spec:
|
||||||
- linode
|
- linode
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
image: forgejo.siriusdevops.com/sirius/osint-dashboard-pg:amd64-c48788d4b614-r2
|
image: forgejo.siriusdevops.com/sirius/osint-dashboard-pg:amd64-c48788d4b614-r3
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
args:
|
args:
|
||||||
- -c
|
- -c
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue