PostgreSQL
Versions
Section titled “Versions”18.4.0 (default), 17.10.0, 16.14.0, on port 15432.
rex service start postgresrex db versions --set postgres 17.10.0Major versions never share a data directory
Section titled “Major versions never share a data directory”PostgreSQL major versions have mutually incompatible on-disk formats — a 17 server cannot read an 18 data directory, and pointing it at one is how people lose databases.
rexenv gives each major its own directory. Switching from 18 to 17 starts 17 with 17’s data, leaves 18’s alone, and does not attempt an in-place downgrade. Switch back and your 18 databases are where you left them.
Moving data across a major version is an explicit dump and restore, as it is everywhere else:
rex db export myapp.rexrex db import myapp.rex dump.sqlConnecting
Section titled “Connecting”host 127.0.0.1port 15432The site’s page shows its database name and credentials, and rex db browse opens Adminer
connected to it.
If it will not start
Section titled “If it will not start”Check your macOS version first — it is the answer more often than anything else:
sw_vers -productVersionBelow 26, PostgreSQL will not run and that is expected. rex doctor reports port conflicts and
the rest.