mise backend plugin for installing PostgreSQL from pre-built binaries. Fast cross-platform installs with SHA256 verification and automatic PGDATA setup -- no compiler toolchain needed. Use a source-build plugin like mise-postgres if you need custom ./configure options.
# Install the backend plugin
mise plugin install postgres-binary https://github.com/kyleking/mise-postgres-binary
# Use in your project
mise use postgres-binary:[email protected]
# PostgreSQL is now available
postgres --version
psql --version# Install a specific PostgreSQL version
mise install postgres-binary:[email protected]
# Use in current directory
cd my-project
mise use postgres-binary:[email protected]
# Start PostgreSQL
mise exec -- pg_ctl start -D $PGDATAThe plugin automatically sets up:
PGDATA: PostgreSQL data directory (auto-initialized withinitdb)PATH: Includes PostgreSQL bin directoryLD_LIBRARY_PATH: PostgreSQL lib directory (Linux)DYLD_LIBRARY_PATH: PostgreSQL lib directory (macOS)PGHOME: PostgreSQL installation directory
The plugin automatically runs initdb on first installation, creating a database cluster in $PGDATA.
mise caches available version lists (~1 hour default TTL). The plugin adds an ETag-based HTTP cache layer (12-hour TTL) at XDG-compliant paths to further reduce GitHub API calls.
- Override TTL:
export MISE_POSTGRES_BINARY_CACHE_TTL=3600(seconds; 0 disables) - Clear mise cache:
mise cache clear
Binaries are sourced from theseus-rs/postgresql-binaries. See their releases for the latest supported versions and platforms.
| Platform | Architecture | Target Triple |
|---|---|---|
| macOS | Intel (x86_64) | x86_64-apple-darwin |
| macOS | Apple Silicon (M1/M2) | aarch64-apple-darwin |
| Linux | x86_64 (glibc) | x86_64-unknown-linux-gnu |
| Linux | ARM64 (glibc) | aarch64-unknown-linux-gnu |
| Linux | x86_64 (musl) | x86_64-unknown-linux-musl |
| Linux | ARM64 (musl) | aarch64-unknown-linux-musl |
| Windows | x86_64 | x86_64-pc-windows-msvc |
SHA256 checksum verification requires platform-specific tools:
Unix/Linux/macOS:
sha256sum(GNU coreutils) ORshasum(macOS/BSD)awk(standard on all systems)
Windows:
- Recommended: PowerShell (included in all modern Windows versions)
- Supports full checksum verification via
Get-FileHashcmdlet
- Supports full checksum verification via
- Alternative: Git Bash, MSYS2, or other Unix-like shells
- File operations will use Unix commands
- Checksum verification automatically skipped (PowerShell required for verification)
- May have better compatibility in CI/CD environments
Skip Checksum Validation (Not Recommended):
On Unix systems, if hash tools are unavailable, you can skip checksum verification:
export MISE_POSTGRES_BINARY_SKIP_CHECKSUM=1WARNING: Skipping checksum validation is insecure and not recommended. Use only in trusted environments where hash tools cannot be installed.
Enable detailed diagnostic output:
# Show all diagnostic information
MISE_DEBUG=1 mise install postgres-binary:[email protected]
# Save output for bug reports
MISE_DEBUG=1 mise install postgres-binary:[email protected] 2>&1 | tee debug.logIf you see "Unsupported platform" error, check:
- Your OS and architecture:
uname -sanduname -m - Available platforms in theseus-rs releases
- Consider using the source-based mise-postgres plugin
This usually indicates a corrupted download. Try:
- Remove the installation:
mise uninstall postgres-binary:postgres@<version> - Clear mise cache:
rm -rf ~/.local/share/mise/downloads/postgres-binary* - Reinstall:
mise install postgres-binary:postgres@<version>
If hash tools are unavailable in your environment, you can skip validation (insecure):
export MISE_POSTGRES_BINARY_SKIP_CHECKSUM=1
mise install postgres-binary:postgres@<version>If you see "PGDATA directory already exists", the database cluster is already initialized. This is normal and safe.
Check logs and port availability:
cat /tmp/postgres.log
lsof -i :5432
pg_ctl start -D "$PGDATA" -o "-p 5433" -l /tmp/postgres.log # Use alternate portSee CONTRIBUTING.md for development setup and guidelines.
- Binaries provided by theseus-rs/postgresql-binaries
- Plugin template from mise-backend-plugin-template
- Inspired by mise-postgres (source-based)