Files
coder/scripts/embedded-pg
Spike Curtis 5354a9fae0 ci: collect embedded postgres logs on Windows and macOS (#29280)
Completes PostgreSQL log capture for the `pg-*` CI jobs by covering the Windows and macOS runners, which use embedded PostgreSQL (`scripts/embedded-pg/main.go`) instead of the Docker container used on Linux.

This enables PostgreSQL's own `logging_collector` via `ALTER SYSTEM` (applied on the restart the script already performs), so the server persists logs to `<data>/log/postgresql.log`. The composite action then uploads that directory as a `postgres-logs-<job>-<os>` artifact on failure.


<details>
<summary>Notes</summary>

- Default log verbosity is kept (no `log_statement=all`); the suite creates thousands of databases, matching the Linux jobs which set `TEST_POSTGRES_LOG_STATEMENT=none`.
- Only `test-go-pg` exercises the embedded path (macOS/Windows). `test-go-pg-17` and `test-go-race-pg` are Linux-only, so the new step is a no-op there.
- The Linux side of this (`docker logs` upload) is in #29217; this PR is independent and adds distinct steps.
</details>

<sub>Opened by Coder Agents on behalf of @spikecurtis.</sub>
2026-09-14 17:19:06 +02:00
..