immich: remove the PostgreSQL 14 cluster

This commit is contained in:
Ruben Hensen committed 2026-10-28 15:40:14 +01:00
1 parent fe105a4fa7
commit c298ad8746
5 files changed
+16 -40

No files matched your search

+7 -6
View File
@@ -26,11 +26,12 @@ docs/longhorn-second-ssd.md:
- [x] Read `~/iosample.log` on opti1: the worst stretch was not the - [x] Read `~/iosample.log` on opti1: the worst stretch was not the
backups but 8.5 hours of Longhorn merging immich-claim's deleted backups but 8.5 hours of Longhorn merging immich-claim's deleted
snapshots (2026-10-24 14:30-23:15), see docs/upgrade-k8s-1.33.md snapshots (2026-10-24 14:30-23:15), see docs/upgrade-k8s-1.33.md
- [ ] From 2026-10-27, if immich runs without problems: delete - [x] From 2026-10-27, if immich runs without problems: delete
`immich/postgresql-cluster.yaml` (the PG14 cluster still runs, 20 GiB), `immich/postgresql-cluster.yaml` (the PG14 cluster, 20 GiB), the
the Longhorn snapshots and backups `immich-pg14-pre-vchord` and Longhorn snapshots and backups `immich-pg14-pre-vchord` and
`immich-pg17-pre-v3`, and both dumps in `~` on opti1. PostgreSQL 14 `immich-pg17-pre-v3`, and both dumps in `~` on opti1. Done 2026-10-28
reaches end of life on 2026-11-12 (PR #61), with the PG14 volume's other Longhorn backups.
`immich-pg17-pre-v3` only ever was a snapshot
- [ ] The upgrade's dqlite and backend copies in `/root/` on opti1 - [ ] The upgrade's dqlite and backend copies in `/root/` on opti1
(`backend-*.tar`, `dqlite-pre-*`) (`backend-*.tar`, `dqlite-pre-*`)
- [ ] Log in to immich as a jeugdlid (quota 0) - [ ] Log in to immich as a jeugdlid (quota 0)
@@ -508,7 +509,7 @@ critical / high:
| Image | Crit | High | What to do | | Image | Crit | High | What to do |
|---|---|---|---| |---|---|---|---|
| tensorchord/cloudnative-pgvecto.rs:14-v0.2.1 | 38 | 342 | immich's old PG14 cluster; goes with the cleanup from 2026-10-27 | | tensorchord/cloudnative-pgvecto.rs:14-v0.2.1 | 38 | 342 | immich's old PG14 cluster; deleted 2026-10-28 |
| cloudnative-pg/postgresql:17.4 | 27 | 260 | authentik's database, a Debian 11 image. Renovate now offers 17.7; a `17.x-standard-trixie` image is more current | | cloudnative-pg/postgresql:17.4 | 27 | 260 | authentik's database, a Debian 11 image. Renovate now offers 17.7; a `17.x-standard-trixie` image is more current |
| tensorchord/cloudnative-vectorchord:17.11-1.1.1 | 17 | 136 | immich's database; look for a newer tag | | tensorchord/cloudnative-vectorchord:17.11-1.1.1 | 17 | 136 | immich's database; look for a newer tag |
| longhornio/longhorn-instance-manager:v1.7.3 | 11 | 159 | still serves 16 volumes, see below | | longhornio/longhorn-instance-manager:v1.7.3 | 11 | 159 | still serves 16 volumes, see below |
+4 -3
View File
@@ -169,8 +169,9 @@ pgvecto.rs. Done 2026-10-24, about an hour of immich downtime:
v2.4.1 refused to start (it only accepts VectorChord <0.6); v2.5.0 and up v2.4.1 refused to start (it only accepts VectorChord <0.6); v2.5.0 and up
accept <2, so immich went to v2.7.5, the last 2.x. It rebuilt both accept <2, so immich went to v2.7.5, the last 2.x. It rebuilt both
indexes as `vchordrq` in about 1.5 minutes indexes as `vchordrq` in about 1.5 minutes
- [ ] After a few days without problems: delete the old cluster - [x] After a few days without problems: delete the old cluster
(`immich/postgresql-cluster.yaml`), the snapshot/backup and the dump. (`immich/postgresql-cluster.yaml`), the snapshot/backup and the dump.
Done 2026-10-28 (PR #61), with the PG14 volume's Longhorn backups.
Rolling back means reverting the old volume to the snapshot, since its Rolling back means reverting the old volume to the snapshot, since its
embeddings are now `real[]` without pgvecto.rs embeddings are now `real[]` without pgvecto.rs
- [x] immich 3.x: v2.7.5 → v3.3.5 with chart 0.10.3 → 0.13.4 on - [x] immich 3.x: v2.7.5 → v3.3.5 with chart 0.10.3 → 0.13.4 on
@@ -189,8 +190,8 @@ pgvecto.rs. Done 2026-10-24, about an hour of immich downtime:
(v3.3.0), for faster ML with less memory; numerically the same models, (v3.3.0), for faster ML with less memory; numerically the same models,
so no jobs to rerun. The model cache is an emptyDir, so the one-off so no jobs to rerun. The model cache is an emptyDir, so the one-off
preparation repeats on every restart preparation repeats on every restart
- [ ] After a few days without problems: delete the `immich-pg17-pre-v3` - [x] After a few days without problems: delete the `immich-pg17-pre-v3`
snapshot and dump together with the PG14 leftovers above snapshot and dump together with the PG14 leftovers above (2026-10-28)
## k8s-dqlite write stalls (found 2026-10-22) ## k8s-dqlite write stalls (found 2026-10-22)
+4 -1
View File
@@ -29,7 +29,10 @@ spec:
# Filled once from the PostgreSQL 14 cluster (immich-postgres) after its # Filled once from the PostgreSQL 14 cluster (immich-postgres) after its
# embedding columns were turned into real[] and pgvecto.rs was dropped, # embedding columns were turned into real[] and pgvecto.rs was dropped,
# see docs/upgrade-k8s-1.33.md. # see docs/upgrade-k8s-1.33.md. That cluster is gone since 2026-10-28, so
# creating this Cluster again fails here, on purpose: an empty database
# would start immich with an empty library. Restore from Garage instead
# (bootstrap.recovery, see postgresql-backup.yaml).
bootstrap: bootstrap:
initdb: initdb:
database: immich database: immich
-28
View File
@@ -1,28 +0,0 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: immich-postgres
namespace: immich
spec:
instances: 1
# Use TensorChord's CNPG-compatible image with pgvecto.rs v0.2.1
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:14-v0.2.1
postgresql:
shared_preload_libraries:
- "vectors.so"
bootstrap:
initdb:
database: immich
owner: immich
postInitSQL:
- CREATE EXTENSION IF NOT EXISTS vectors;
- CREATE EXTENSION IF NOT EXISTS cube;
- CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE;
- ALTER USER immich WITH SUPERUSER;
storage:
size: 20Gi
storageClass: longhorn
+1 -2
View File
@@ -82,8 +82,7 @@
"description": "A PostgreSQL major upgrade needs pg_upgrade or a dump, not a tag bump", "description": "A PostgreSQL major upgrade needs pg_upgrade or a dump, not a tag bump",
"matchDepNames": [ "matchDepNames": [
"ghcr.io/cloudnative-pg/postgresql", "ghcr.io/cloudnative-pg/postgresql",
"ghcr.io/tensorchord/cloudnative-vectorchord", "ghcr.io/tensorchord/cloudnative-vectorchord"
"ghcr.io/tensorchord/cloudnative-pgvecto.rs"
], ],
"matchUpdateTypes": [ "matchUpdateTypes": [
"major" "major"