fix(supabase): db:trial database logs no statement from its first start

The image's init (migrate.sh) sent the supabase_admin password as SQL text
while its postgresql.conf logged DDL, so the password reached the container
log. The server now starts with -c log_statement=none, which the entrypoint
also hands to the init server; a harness check pins it, and DEPLOY.md makes
the post-init log scan a production prerequisite.
This commit is contained in:
bchanot committed 2026-11-11 19:53:56 +01:00
1 parent c6c984b954
commit 5f63d2229c
4 files changed
+15 -2

No files matched your search

+1 -1
View File
@@ -936,7 +936,7 @@ Proven only at the first `create` (the stub harness cannot prove them): the data
ownership in the database image, `set local pgaudit.log` and `set local pg_stat_statements.track_utility` accepted by
the image, the init's session-level `set` lines (`log_statement`, `log_min_duration_statement`,
`log_min_error_statement`, `pgaudit.log`, `pg_stat_statements.track_utility`) accepted by it, whether the image's own
init runs an `ALTER USER supabase_admin ... PASSWORD` before the schema file (where the init's settings cannot help), loopback `trust` in its `pg_hba.conf`
init runs an `ALTER USER supabase_admin ... PASSWORD` before the schema file (where the init's settings cannot help; the first create, 2026-11-11, proved it does: `migrate.sh` runs the statement on the init temp server and the image's `postgresql.conf` sets `log_statement = 'ddl'`, so the statement with the password reached the db container's log; `create` now starts the server with `-c log_statement=none`, which the entrypoint hands to the init temp server and to the final server; not closed, named only: a failing init statement is still logged at the image's `log_min_error_statement = error`, `migrate.sh` puts the password on psql's command line inside the container during init, and `db-sandbox.sh` starts its database the same way without the flag; the fix is proven only by a `create` on a fresh volume with the container log scanned for the password, counts only, with the scan commands below), loopback `trust` in its `pg_hba.conf`
(the rotation's commit marker relies on it), psql's echo of an error statement (a failing rotation statement must not print a
secret), and the grant and factor SQL, which the harness checks as text and which first
runs at the first real `grant`. Checks to make right after that first `create`, printing no value, only counts.