Difference between revisions of "Brew install postgresql@15"

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
 
  ==> postgresql@15
 
  ==> postgresql@15
 
  This formula has created a default database cluster with:
 
  This formula has created a default database cluster with:
   [[initdb]] --locale=C -E UTF-8 /Users/user/brew/var/postgresql@15
+
   [[initdb]] [[--locale]]=C [[-E]] [[UTF-8]] /Users/user/brew/var/postgresql@15
 
  For more details, read:
 
  For more details, read:
 
   https://www.postgresql.org/docs/15/app-initdb.html
 
   https://www.postgresql.org/docs/15/app-initdb.html

Revision as of 10:56, 14 February 2023

brew install postgresql@15
==> Caveats
==> postgresql@15
This formula has created a default database cluster with:
  initdb --locale=C -E UTF-8 /Users/user/brew/var/postgresql@15
For more details, read:
  https://www.postgresql.org/docs/15/app-initdb.html
postgresql@15 is keg-only, which means it was not symlinked into /Users/user/brew,
because this is an alternate version of another formula.

If you need to have postgresql@15 first in your PATH, run:
  echo 'export PATH="/Users/user/brew/opt/postgresql@15/bin:$PATH"' >> ~/.zshrc

For compilers to find postgresql@15 you may need to set:
  export LDFLAGS="-L/Users/user/brew/opt/postgresql@15/lib"
  export CPPFLAGS="-I/Users/user/brew/opt/postgresql@15/include"

For pkg-config to find postgresql@15 you may need to set:
  export PKG_CONFIG_PATH="/Users/user/brew/opt/postgresql@15/lib/pkgconfig"


To restart postgresql@15 after an upgrade:
  brew services restart postgresql@15
Or, if you don't want/need a background service you can just run:
  /Users/user/brew/opt/postgresql@15/bin/postgres -D /Users/user/brew/var/postgresql@15


To connect:


Errors

psql
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL:  database "xxxx" does not exist

Related


See also

Advertising: