Skip to content

Comments

Install PostgreSQL from theseus-rs/postgresql-binaries instead of apt#4310

Merged
kyleconroy merged 4 commits intomainfrom
claude/add-postgres-binary-verification-KwXDB
Feb 22, 2026
Merged

Install PostgreSQL from theseus-rs/postgresql-binaries instead of apt#4310
kyleconroy merged 4 commits intomainfrom
claude/add-postgres-binary-verification-KwXDB

Conversation

@kyleconroy
Copy link
Collaborator

Replace the apt-based PostgreSQL installation with pre-built binaries from
github.com/theseus-rs/postgresql-binaries. This eliminates the apt dependency
for PostgreSQL entirely.

Key changes:

  • Download PostgreSQL 16.8.0 binaries from theseus-rs/postgresql-binaries
  • Verify downloads with hardcoded SHA256 checksums (linux/amd64 and linux/arm64)
  • Install to /opt/sqlc/postgresql (sqlc-specific directory)
  • Use pg_ctl and initdb directly instead of systemd/service for lifecycle
  • Run PostgreSQL as the current user (no postgres system user needed)
  • Configure pg_hba.conf and postgresql.conf programmatically

https://claude.ai/code/session_018koD7tHEa2W5cXbiPPYatB

Replace the apt-based PostgreSQL installation with pre-built binaries from
github.com/theseus-rs/postgresql-binaries. This eliminates the apt dependency
for PostgreSQL entirely.

Key changes:
- Download PostgreSQL 16.8.0 binaries from theseus-rs/postgresql-binaries
- Verify downloads with hardcoded SHA256 checksums (linux/amd64 and linux/arm64)
- Install to /opt/sqlc/postgresql (sqlc-specific directory)
- Use pg_ctl and initdb directly instead of systemd/service for lifecycle
- Run PostgreSQL as the current user (no postgres system user needed)
- Configure pg_hba.conf and postgresql.conf programmatically

https://claude.ai/code/session_018koD7tHEa2W5cXbiPPYatB
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🔧 golang labels Feb 22, 2026
- Upgrade from PostgreSQL 16.8.0 to 18.2.0 with updated SHA256 checksums
- Store PostgreSQL binaries in ~/.cache/sqlc/postgresql (via os.UserCacheDir)
  instead of /opt/sqlc/postgresql, eliminating the need for sudo to create
  the install directory

https://claude.ai/code/session_018koD7tHEa2W5cXbiPPYatB
PostgreSQL 18 rejects --pwfile=/dev/null because the file is empty.
Since we use --auth=trust for initial setup (and set the password
afterward via ALTER USER), the --pwfile flag is unnecessary.

https://claude.ai/code/session_018koD7tHEa2W5cXbiPPYatB
The prebuilt PostgreSQL 18 binary includes uuid-ossp.so which links
against libossp-uuid.so.16. Install the system package so the
extension can be loaded at runtime.

https://claude.ai/code/session_018koD7tHEa2W5cXbiPPYatB
@kyleconroy kyleconroy merged commit 0a3d50e into main Feb 22, 2026
13 of 14 checks passed
@kyleconroy kyleconroy deleted the claude/add-postgres-binary-verification-KwXDB branch February 22, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. 🔧 golang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants