Skip to content

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
Copy Markdown
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
khepin added a commit to khepin/sqlc that referenced this pull request Apr 15, 2026
* origin/main: (91 commits)
  build(deps): bump urllib3 from 2.6.2 to 2.6.3 in /docs (sqlc-dev#4259)
  build(deps): bump golang from 1.26.0 to 1.26.1 (sqlc-dev#4328)
  build(deps): bump the production-dependencies group across 1 directory with 4 updates (sqlc-dev#4348)
  Upgrade Go version to 1.26.0 (sqlc-dev#4312)
  Install PostgreSQL from theseus-rs/postgresql-binaries instead of apt (sqlc-dev#4310)
  build(deps): bump golang from 1.25.5 to 1.26.0 (sqlc-dev#4294)
  build(deps): bump the production-dependencies group across 1 directory with 2 updates (sqlc-dev#4296)
  Add sqlc-test-setup command for database test environment setup (sqlc-dev#4304)
  build(deps): bump filippo.io/edwards25519 from 1.1.0 to 1.1.1 (sqlc-dev#4303)
  build(deps): bump the production-dependencies group across 1 directory with 4 updates (sqlc-dev#4284)
  feat: add ClickHouse support to `sqlc parse` (sqlc-dev#4267)
  Add GitHub Topic to the plugins page (sqlc-dev#4258)
  build(deps): bump the production-dependencies group across 1 directory with 2 updates (sqlc-dev#4256)
  build(deps): bump the production-dependencies group across 1 directory with 4 updates (sqlc-dev#4248)
  fix(native): make MySQL connection check immediate on first attempt (sqlc-dev#4254)
  feat: graduate parsecmd experiment (sqlc-dev#4253)
  docs: Add Claude Code remote environment setup instructions (sqlc-dev#4246)
  Add parse subcommand with AST JSON output (sqlc-dev#4240)
  feat(postgresql): add analyzerv2 experiment for database-only analysis (sqlc-dev#4237)
  feat: add native database support for e2e tests without Docker (sqlc-dev#4236)
  ...

# Conflicts:
#	internal/engine/sqlite/convert.go
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