When start() returns an error, main() logged it via the slog logger and
returned normally (exit 0), so a crash-looping pod showed as "Completed"
with no error in the logs: start() defers the OTel SDK shutdown, tearing
down the log exporter before main() logs, so with LOG_FORMAT=otel the
record never reaches Alloy.
Also write the error to stderr (always captured by `kubectl logs`) and
os.Exit(1) so the container is correctly reported as failed.
pg v1.19.0+ auto-runs an idempotency migration whose partial index used a
non-IMMUTABLE now() predicate, which Postgres rejects at creation. That
failed pg.New() at startup and crash-looped the service (silently, exit 0).
schemas was on the broken pg v1.20.0.
The fix is in pg's v2 line; v2.0.0/v2.0.1 were unconsumable (go.mod module
path lacked the required /v2 suffix), corrected in v2.0.2. Bump to:
- gitlab.com/unboundsoftware/eventsourced/pg/v2 v2.0.2
- gitlab.com/unboundsoftware/eventsourced/eventsourced v1.23.0 (required by pg/v2)
Only the import path changes (.../pg -> .../pg/v2); package stays `pg`, no
call sites change.