reset-admin.js opened data/travel.db with better-sqlite3 whatever the
engine, so on a Postgres install it created a stray SQLite file or reset
the admin in a leftover one. With TREK_DB_URL set it now resets the account
in Postgres through the built server's engine (its pool, SSL and write
lock, in one transaction), and refuses a TREK_DB_FILE beside the URL; the
SQLite branch is unchanged. migrate-encryption.ts cannot re-encrypt the
secrets in Postgres yet, so it now stops before it opens or writes any file
when TREK_DB_URL is set. The wiki says what each does on Postgres.
- Database-Postgres: supported versions, the version 18 client and the tool
search order, sslrootcert with a client before 16, how to create a role
that is not a superuser and move an older compose install to one, a
current schema other than public, and the space a restore needs.
- Updating: the manual rollback clears the whole schema and loads the copy
in one transaction, as TREK's restore does; dropping only the tables left
the collation, the trigger functions and the sequences behind. A unit
test keeps the printed statement equal to CLEAR_SCHEMA_SQL, and the boot's
rollback hint points at that section.
- Troubleshooting, Install-Docker-Compose, Environment-Variables, README
and server/CLAUDE.md follow.
The checklist ran against a Supabase project over the direct connection. The page now says what it found: the CA to verify the server with, the IPv6-only direct host, the postgres role creating the collation, backups holding only TREK's schema, and the latency of a distant region.
- wiki/Database-Postgres.md: requirements (PostgreSQL 14 to 17, an empty
database of its own, a role that is not a superuser, ICU), configuration
and SSL, first boot, upgrades and the .pgdump copy, backups and restore,
limitations (no SQLite to Postgres move yet, one replica), notes for
Supabase, and the manual checklist still to run against it.
- docker-compose.postgres.yml: TREK beside a postgres:17 service.
- Helm: database.url (written into the chart's Secret) or
database.existingSecret supplies TREK_DB_URL; replicas stay at one, now
for the state TREK keeps in memory.
- Environment variables, backups, updating, troubleshooting, the Docker
Compose and Helm install pages, the sidebar and the README point at it.