PostgreSQL on Neon for visits and introductions

Visits and introductions go to serverless PostgreSQL on Neon’s free tier, with Flyway migrations; moving to Cloud SQL is a connection-string change.

Status
Accepted 1 October 2026, revised 25 October 2026 · built 2026-10-03 with plain SQL rather than Spring Data, see ADR 0012 · the assistant keeps nothing here, see ADR 0019 · accounts keep what their holders choose, see ADR 0023
The record
0005-postgres-on-neon.md

Context

Tracking and the admin panel need a small amount of durable, queryable data. The assistant was to keep its logs here too; as built it keeps nothing (ADR 0019), and this record was revised to stop saying otherwise. Cloud SQL costs $10–25/month for an always-on instance; Firestore is free but foreign to a Java/SQL portfolio.

Decision

Serverless PostgreSQL on Neon's free tier (scales to zero), with Flyway migrations and Spring Data. Moving to Cloud SQL later is a connection-string change.

Consequences

  • A cold database adds latency to the first write after idle periods; writes from the site are asynchronous.
  • Real SQL, migrations and integration tests with Testcontainers — the same stack used in production work.