Skip to content

Configuration ​

Environment variables ​

Variable
PGEMBED_CACHE_DIRCache folder for downloads and instances (also --cache-dir); shared with MysticMind.PostgresEmbed
PGEMBED_MAVEN_REPOA Maven mirror with the Postgres binaries (also --maven-repo); default Maven Central
PGEMBED_PAGER, PAGERThe pager for long results; default less -SFX; an empty value turns it off
PGEMBED_REQUIRE_PASSWORD1 gives every instance started a password for TCP connections (as start --password), for shared machines
PGEMBED_ALLOW_HTTP_REPO1 allows an http Maven mirror on a network you trust
PGEMBED_TRACE1 prints where a command's time goes, on standard error
PGPASSWORD, ~/.pgpassPasswords for connection strings that have none
NO_COLORTurns colors off

Options for every command ​

Option
--jsonMachine-readable output on standard output
--cache-dirCache folder
--maven-repoA Maven mirror
--verboseLog details to standard error

Cache ​

OSDefault location
Linux$XDG_CACHE_HOME/pgembed, else ~/.cache/pgembed
macOS~/Library/Caches/pgembed
Windows%LOCALAPPDATA%\pgembed
txt
<cache>/
  binaries/          downloads and extracted installs, one per version and platform
  instances/<name>/  an instance: instance.json (version, port, settings), data/, postgres.log
  metadata/          cached version lists, refreshed every 24 hours
  history/           the interactive prompt's history

Exit codes ​

Code
0Success
1A failure: a SQL error, a refused change, a failed check
2A usage error
130Cancelled (Ctrl+C)

Released under the MIT License.