PostgreSQL compartido (postgres)
PostgreSQL compartido en una caja Self Host Wizard: la pieza postgres, solo interna, ingreso none, límite de memoria 241 MB.
De un vistazo
| Dato | Valor |
|---|---|
| Dirección | no está en la web (solo la usan las piezas que la necesitan) |
| Ingreso | none: sin ingreso de la oficina adelante |
| Límite de memoria | 241 MB (ram_mb: pico medido × 1,3) |
| Base de datos | ninguna compartida: guarda sus datos en THX_DATA |
| Necesita | nada |
| La necesitan | glitchtip, listmonk, umami |
| Contenedores | postgres |
Imagen: postgres | postgres:18.7-trixie@sha256:c699303802144847d238196173655dbbecf7a96aeca1565f2b02eb671a1f0b6b |
| Licencia (según el README) | PostgreSQL Licence |
| Proyecto original (según el README) | https://www.postgresql.org |
Cómo activarla
thx enable agrega postgres y todo lo que necesita al estado de la caja; después thx apply la instala. Las apps se aplican recién cuando site_domain está definido.
sudo thx enable postgres
sudo thx apply
Notas técnicas (pieces/postgres/README.md)
Las notas técnicas de cada pieza están en inglés, tal como están en el repositorio.
PostgreSQL 18.7, PostgreSQL Licence. Image postgres:18.7-trixie (Docker
Library), pinned by index digest sha256:c6993038…0b6b; the index has linux/arm64
(docker buildx imagetools inspect, 2026-11-24). Upstream image, unmodified.
How it is wired
- Internal only:
postgres:5432on the thx network; no host port, no web host. - For each enabled piece with
db = "postgres",thx applycreates database and owner<name>(-→_) with the piece's generated password; the check logs in as that user over TCP, which proves the password. The superuser password stays in/etc/thx/secrets/postgres/. - Sized for a 12 GB box shared by many apps:
shared_buffers=128MB,max_connections=100,work_mem=4MB. - Data in
THX_DATA(PostgreSQL 18 keeps PGDATA in a versioned subdirectory). A major upgrade (19) needs a dump/restore; the pin keeps it from happening by surprise.
Measured
RAM: measured peak 185 MiB (anon + shmem + kernel from memory.stat, sampled through the whole check.sh docker stage including a 10-client database load; 512 MiB with page cache) × 1.3 = ram_mb 241, mem_limit 241m. Measured 2026-11-25, e2e run 6.
Known gaps
- No backups here (the backup lane's job). No connection pooler.