A vfox / mise plugin for managing PostgreSQL versions.
- Dynamic version fetching: Automatically fetches available versions from PostgreSQL's official FTP server
- Always up-to-date: No static version list to maintain
- Compiles from source: Uses official PostgreSQL source releases
- Includes contrib modules: Builds and installs useful extensions
- Automatic initdb: Initializes a database cluster (can be skipped)
- Cross-platform: Works on Linux and macOS
- A C compiler (gcc or clang)
- make
- readline (libreadline-dev on Debian/Ubuntu)
- zlib (zlib1g-dev on Debian/Ubuntu)
- OpenSSL (libssl-dev on Debian/Ubuntu)
xcode-select --install
brew install openssl readlinesudo apt-get install build-essential libreadline-dev zlib1g-dev libssl-dev uuid-devsudo yum groupinstall "Development Tools"
sudo yum install readline-devel zlib-devel openssl-devel uuid-develmise install postgres@latest
mise install [email protected]
mise install [email protected]vfox add postgres
vfox install postgres@latest# List all available versions
mise ls-remote postgres
# Install a specific version
mise install [email protected]
# Set global version
mise use -g [email protected]
# Set local version (creates .mise.toml)
mise use [email protected]This plugin sets the following environment variables:
PATH- Adds the PostgreSQL bin directoryPGDATA- Points to the data directory ({install_path}/data)LD_LIBRARY_PATH- Adds PostgreSQL lib directory (Linux only)
If you don't want the plugin to run initdb automatically:
POSTGRES_SKIP_INITDB=1 mise install [email protected]Add extra configure options:
POSTGRES_EXTRA_CONFIGURE_OPTIONS="--with-python" mise install [email protected]Or override all configure options (prefix is always added):
POSTGRES_CONFIGURE_OPTIONS="--with-openssl --with-python" mise install [email protected]After installation:
# Start the server
pg_ctl -D $PGDATA -l logfile start
# Or run in foreground
postgres -D $PGDATA
# Connect
psql -U postgresThis plugin:
- Fetches the list of available versions from ftp.postgresql.org
- Downloads the source tarball for the requested version
- Compiles PostgreSQL with
./configure && make && make install - Builds and installs contrib modules
- Runs
initdbto create an initial database cluster
MIT License - see LICENSE for details.