GithubHelp home page GithubHelp logo

homebrew-postgresql's Introduction

Homebrew PostgreSQL things

These formulae allow installing multiple versions of PostgreSQL in parallel. This is similar to what you can do on certain Linux distributions, for example Debian.

To install something, first brew tap petere/postgresql and then brew install <formula>. Since there might be name overlaps with core Homebrew formulae, you should use fully qualified formula names like brew install petere/postgresql/postgresql-common.

Build Status

Details

Since PostgreSQL major releases have incompatible data directories and other occasional incompatibilities, it is useful for many developers to keep several major versions installed in parallel for development, testing, and production. So far, Homebrew had inconsistent support for that and did not provide the full range of supported major versions. This tap provides versioned formulae named [email protected], [email protected], etc. that you can install in parallel. Technically, these are "keg-only", which has the nice side effect that they are automatically installed in side-by-side directories /usr/local/opt/[email protected]/ etc.

To use the programs installed by these formulae, do one or more of the following, in increasing order of preference:

  • Call all programs explicitly with /usr/local/opt/[email protected]/bin/.... This will be boring in the long run.
  • Add your preferred /usr/local/opt/[email protected]/bin etc. to your path. Preferably to the front, to come before the operating system's PostgreSQL installation. This will work alright, but depending on your setup, it might be difficult to get everything on the OS to see the same path.
  • brew link -f the [email protected] formula you prefer to use.
  • Install the postgresql-common package (see below).

The versioned formulae can be installed alongside the main postgresql formula in Homebrew. But there will be a conflict if you do brew link -f or install postgresql-common, so in those cases you have to uninstall the main postgresql package first. This is not a problem, however, because the versioned packages provide the same functionality.

Build options

The standard postgresql formula in Homebrew is missing a number of build options and also has a number of build options that I find useless. These formulae enable all configure options that macOS can support, but also remove a number of Homebrew-level build options, to reduce complexity. I have also dropped supported for legacy macOS concerns, such as 32-bit Intel and PowerPC and really old macOS releases. Mainly because I can't test that anymore, YMMV.

Old versions

I keep old and deprecated versions of PostgreSQL in this repository instead of removing them, because they are sometimes useful to have handy, and also for curiosity. But note that over time, the oldest versions will stop building and/or running on newer operating system versions. The PostgreSQL major versions that are still maintained upstream are expected to work, but anything beyond that is best-effort and YMMV.

postgresql-common cluster manager

postgresql-common is a port of the postgresql-common package from Debian, which contains programs that help manage these multiple versioned installations, and programs to manage multiple PostgreSQL instances (clusters). The port a bit experimental, but it works.

See /usr/local/opt/postgresql-common/README.Debian to get started. If you have used Debian or Ubuntu before, you'll feel right at home (I hope).

The general idea is that for server-side operations you use the special wrapper scripts pg_createcluster, pg_dropcluster, pg_ctlcluster, and pg_lsclusters instead of initdb and pg_ctl. The scripts take version numbers and instance names (which map to directory names). For example:

pg_createcluster 9.6 test
pg_ctlcluster 9.6 test start

See the respective man pages for details.

For client-side operations, to usual tools such as psql and pg_dump are wrapped to automatically use the right version for the instance they are connecting to, so you usually don't need to do anything special. See the man page pg_wrapper for details.

Extensions

To install extensions, I recommend Pex. It has support for multiple PostgreSQL installations and can easily support to the installation scheme used by these packages. Example:

pex -g /usr/local/opt/[email protected] install ip4r

homebrew-postgresql's People

Contributors

j3rn avatar jasonmp85 avatar joshpencheon avatar kevinji avatar petere avatar vinbarnes avatar webervin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebrew-postgresql's Issues

Dupes openldap and tcl-tk deprecated

Installing postgresql-9.3, I got the following warning:

Warning: Use openldap instead of deprecated homebrew/dupes/openldap
Warning: Use tcl-tk instead of deprecated homebrew/dupes/tcl-tk
Warning: Use openldap instead of deprecated homebrew/dupes/openldap
Warning: Use tcl-tk instead of deprecated homebrew/dupes/tcl-tk
Warning: Use openldap instead of deprecated homebrew/dupes/openldap
Warning: Use tcl-tk instead of deprecated homebrew/dupes/tcl-tk
Warning: Use openldap instead of deprecated homebrew/dupes/openldap
Warning: Use tcl-tk instead of deprecated homebrew/dupes/tcl-tk

I'll take a pass at this in a minute, but wanted to document this in case I can't work it out.

compile issue postgresql-8.4

on os x 10.9 postgresql-8.4 won't compile unless you edit the configure options in postgresql-8.4.rb:

comment out --with-bonjour on line 29
add after "--with-tcl",
"--with-tclconfig=#{MacOS.sdk_path}/System/Library/Frameworks/Tcl.framework/"

maybe this affects other versions too

Unable to install postgresql-9.6 in El Capitan

The installation halts with this error message:

==> Installing postgresql-9.6 from petere/homebrew-postgresql
==> Cloning http://git.postgresql.org/git/postgresql.git
Updating /Library/Caches/Homebrew/postgresql-9.6--git
==> Checking out branch master
==> ./configure --prefix=/usr/local/Cellar/postgresql-9.6/HEAD --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with-ldap --with-libxml --with-libxslt --with-open
==> make install-world
Last 15 lines from /Users/fnando/Library/Logs/Homebrew/postgresql-9.6/02.make:
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -bundle -multiply_defined suppress -Wl,-undefined,dynamic_lookup -o regress.so  regress.o -L../../../src/port -L../../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs   -bundle_loader ../../../src/backend/postgres
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  pg_regress.o pg_regress_main.o -L../../../src/port -L../../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs   -lpgcommon -lpgport -lintl -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm  -o pg_regress
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -L../../src/port -L../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs  -L../../src/port -lpgport  -bundle -bundle_loader ../../src/backend/postgres -o autoinc.so autoinc.o
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -L../../src/port -L../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs  -L../../src/port -lpgport  -bundle -bundle_loader ../../src/backend/postgres -o insert_username.so insert_username.o
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -L../../src/port -L../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs  -L../../src/port -lpgport  -bundle -bundle_loader ../../src/backend/postgres -o moddatetime.so moddatetime.o
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -L../../src/port -L../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs  -L../../src/port -lpgport  -bundle -bundle_loader ../../src/backend/postgres -o refint.so refint.o
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -L../../src/port -L../../src/common -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib  -L/usr/local/opt/gettext/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/tcl-tk/lib -Wl,-dead_strip_dylibs  -L../../src/port -lpgport  -bundle -bundle_loader ../../src/backend/postgres -o timetravel.so timetravel.o
cp ../../../contrib/spi/refint.so refint.so
cp ../../../contrib/spi/autoinc.so autoinc.so
/usr/bin/install -c  pg_regress '/usr/local/Cellar/postgresql-9.6/HEAD/lib/pgxs/src/test/regress/pg_regress'
/bin/sh ../config/install-sh -c -d '/usr/local/Cellar/postgresql-9.6/HEAD/lib/pgxs/src'
/usr/bin/install -c -m 644 Makefile.global '/usr/local/Cellar/postgresql-9.6/HEAD/lib/pgxs/src/Makefile.global'
/usr/bin/install -c -m 644 Makefile.port '/usr/local/Cellar/postgresql-9.6/HEAD/lib/pgxs/src/Makefile.port'
/usr/bin/install -c -m 644 ./Makefile.shlib '/usr/local/Cellar/postgresql-9.6/HEAD/lib/pgxs/src/Makefile.shlib'
/usr/bin/install -c -m 644 ./nls-global.mk '/usr/local/Cellar/postgresql-9.6/HEAD/lib/pgxs/src/nls-global.mk'

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/petere/homebrew-postgresql/issues

The full debugging logging is available at https://gist.github.com/3e7e5b6d91e9e14c9707.

Fully qualified name petere/postgresql/postgresql@10 is needed to install correct formula

Hey, I noticed a while ago that brew install postgresql@10 doesn't use the formula from this tap, but instead installs the core postgresql formula. However when using brew install [email protected] I do get a package from this tap ๐Ÿค” .

A workaround is to specify the fully qualified name brew install petere/postgresql/postgresql@10 or use brew tap-pin petere/postgresql.

There's documentation about formula name collisions here https://docs.brew.sh/Taps#formula-duplicate-names

Some ideas for how to make this clearer in the README:

  • Suggest brew install petere/postgresql/<formula> instead of brew install <formula>
  • Or suggest brew tap-pin petere/postgresql instead
  • Do you want a pull request?

Here's how to reproduce it:

brew tap petere/postgresql
brew install postgresql-common
brew install [email protected]

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).

==> Downloading https://homebrew.bintray.com/bottles/[email protected]_sierra.bottle.tar.gz
Already downloaded: /Users/albert/Library/Caches/Homebrew/[email protected]_sierra.bottle.tar.gz
==> Pouring [email protected]_sierra.bottle.tar.gz
==> Caveats
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
Homebrew/legacy-homebrew#2510

To migrate existing data from a previous major version (pre-9.0) of PostgreSQL, see:
https://www.postgresql.org/docs/9.6/static/upgrading.html

To migrate existing data from a previous minor version (9.0-9.5) of PostgreSQL, see:
https://www.postgresql.org/docs/9.6/static/pgupgrade.html

You will need your previous PostgreSQL installation from brew to perform pg_upgrade.
Do not run brew cleanup [email protected] until you have performed the migration.

This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/[email protected]/lib
CPPFLAGS: -I/usr/local/opt/[email protected]/include

To have launchd start [email protected] now and restart at login:
brew services start [email protected]
Or, if you don't want/need a background service you can just run:
pg_ctl -D /usr/local/var/[email protected] start
==> Summary
๐Ÿบ /usr/local/Cellar/[email protected]/9.6.9: 3,287 files, 37.0MB

brew install postgresql@10 โš ๏ธ

==> Downloading https://homebrew.bintray.com/bottles/postgresql-10.4.high_sierra.bottle.tar.gz
Already downloaded: /Users/albert/Library/Caches/Homebrew/postgresql-10.4.high_sierra.bottle.tar.gz
==> Pouring postgresql-10.4.high_sierra.bottle.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/clusterdb
Target /usr/local/bin/clusterdb
is a symlink belonging to postgresql-common. You can unlink it:
brew unlink postgresql-common

To force the link and overwrite all conflicting files:
brew link --overwrite postgresql

To list all files that would be deleted:
brew link --overwrite --dry-run postgresql

Possible conflicting files are:
/usr/local/bin/clusterdb -> /usr/local/Cellar/postgresql-common/189+hb1/bin/clusterdb
/usr/local/bin/createdb -> /usr/local/Cellar/postgresql-common/189+hb1/bin/createdb
/usr/local/bin/createuser -> /usr/local/Cellar/postgresql-common/189+hb1/bin/createuser
/usr/local/bin/dropdb -> /usr/local/Cellar/postgresql-common/189+hb1/bin/dropdb
/usr/local/bin/dropuser -> /usr/local/Cellar/postgresql-common/189+hb1/bin/dropuser
/usr/local/bin/pg_basebackup -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pg_basebackup
/usr/local/bin/pg_config -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pg_config
/usr/local/bin/pg_dump -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pg_dump
/usr/local/bin/pg_dumpall -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pg_dumpall
/usr/local/bin/pg_isready -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pg_isready
/usr/local/bin/pg_restore -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pg_restore
/usr/local/bin/pgbench -> /usr/local/Cellar/postgresql-common/189+hb1/bin/pgbench
/usr/local/bin/psql -> /usr/local/Cellar/postgresql-common/189+hb1/bin/psql
/usr/local/bin/reindexdb -> /usr/local/Cellar/postgresql-common/189+hb1/bin/reindexdb
/usr/local/bin/vacuumdb -> /usr/local/Cellar/postgresql-common/189+hb1/bin/vacuumdb
/usr/local/bin/vacuumlo -> /usr/local/Cellar/postgresql-common/189+hb1/bin/vacuumlo
==> /usr/local/Cellar/postgresql/10.4/bin/initdb /usr/local/var/postgres
Last 15 lines from /Users/albert/Library/Logs/Homebrew/postgresql/post_install.01.initdb:
2018-06-21 15:22:19 +0200

/usr/local/Cellar/postgresql/10.4/bin/initdb
/usr/local/var/postgres

The files belonging to this database system will be owned by user "albert".
This user must also own the server process.

initdb: file "/usr/local/share/postgresql/postgres.bki" does not exist
This might mean you have a corrupted installation or identified
the wrong directory with the invocation option -L.
Warning: The post-install step did not complete successfully
You can try again using brew postinstall postgresql
==> Caveats
To migrate existing data from a previous major version of PostgreSQL run:
brew postgresql-upgrade-database

To have launchd start postgresql now and restart at login:
brew services start postgresql
Or, if you don't want/need a background service you can just run:
pg_ctl -D /usr/local/var/postgres start
==> Summary
๐Ÿบ /usr/local/Cellar/postgresql/10.4: 3,389 files, 39.2MB

brew list | grep postgresql
pg_createcluster 9.6 pg9

Creating new PostgreSQL cluster 9.6/pg9 ...
/usr/local/opt/[email protected]/bin/initdb -D /usr/local/var/lib/postgresql/9.6/pg9 --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "albert".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/var/lib/postgresql/9.6/pg9 ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

/usr/local/opt/[email protected]/bin/pg_ctl -D /usr/local/var/lib/postgresql/9.6/pg9 -l logfile start

Ver Cluster Port Status Owner Data directory Log file
9.6 pg9 5432 down albert /usr/local/var/lib/postgresql/9.6/pg9 /usr/local/var/log/postgresql/postgresql-9.6-pg9.log

pg_createcluster 10 pg10 ๐Ÿ’ฅ

Creating new PostgreSQL cluster 10/pg10 ...
/usr/local/opt/postgresql@10/bin/initdb -D /usr/local/var/lib/postgresql/10/pg10 --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "albert".
This user must also own the server process.

initdb: file "/usr/local/share/postgresql/postgres.bki" does not exist
This might mean you have a corrupted installation or identified
the wrong directory with the invocation option -L.
Error: initdb failed

brew uninstall postgresql@10
brew install petere/postgresql/postgresql@10

==> Installing postgresql@10 from petere/postgresql
==> Installing dependencies for petere/postgresql/postgresql@10: pkg-config, e2fsprogs, openldap, icu4c, tcl-tk
==> Installing petere/postgresql/postgresql@10 dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/f1/f1b29fb5388dccab0fcaf665ab43d308ee51816b24262417bf83a686b6e308ae?__gda__=exp=1529588096~hmac=b9f7a43457a1228
######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.high_sierra.bottle.tar.gz
๐Ÿบ /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB
==> Installing petere/postgresql/postgresql@10 dependency: e2fsprogs
==> Downloading https://homebrew.bintray.com/bottles/e2fsprogs-1.44.2.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/85/85d5829a6e42d07b909db8341cc5c1cc38c2a1cd27f7cc3574195755e567a786?__gda__=exp=1529588097~hmac=237f4781160179e
######################################################################## 100.0%
==> Pouring e2fsprogs-1.44.2.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because this installs several executables which shadow macOS system commands.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/e2fsprogs/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/e2fsprogs/sbin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/e2fsprogs/lib
CPPFLAGS: -I/usr/local/opt/e2fsprogs/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/e2fsprogs/lib/pkgconfig

==> Summary
๐Ÿบ /usr/local/Cellar/e2fsprogs/1.44.2: 138 files, 6.9MB
==> Installing petere/postgresql/postgresql@10 dependency: openldap
==> Downloading https://homebrew.bintray.com/bottles/openldap-2.4.46.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/20/2094541bf0f0b265e6cc1518aa5ac223b75834f0aa12bec8e00b6c9469e9b5d9?__gda__=exp=1529588098~hmac=1ffea85f19ee33c
######################################################################## 100.0%
==> Pouring openldap-2.4.46.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openldap/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/openldap/sbin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openldap/lib
CPPFLAGS: -I/usr/local/opt/openldap/include

==> Summary
๐Ÿบ /usr/local/Cellar/openldap/2.4.46: 327 files, 6.6MB
==> Installing petere/postgresql/postgresql@10 dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-61.1.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/be/be8b3ba9420c4da1a75b2e6ebb7a0b835e2919d6499216383f0f313b1d9bb26b?__gda__=exp=1529588100~hmac=4a655c8952c263c
######################################################################## 100.0%
==> Pouring icu4c-61.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/icu4c/lib/pkgconfig

==> Summary
๐Ÿบ /usr/local/Cellar/icu4c/61.1: 249 files, 67.2MB
==> Installing petere/postgresql/postgresql@10 dependency: tcl-tk
==> Downloading https://homebrew.bintray.com/bottles/tcl-tk-8.6.8.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/cd/cd4dec2b564dcad86b151803c852142366bc48ec1b13d48a2e495c83fc32a688?__gda__=exp=1529588105~hmac=e1e6abbf9af7be2
######################################################################## 100.0%
==> Pouring tcl-tk-8.6.8.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because tk installs some X11 headers and macOS provides an (older) Tcl/Tk.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/tcl-tk/lib
CPPFLAGS: -I/usr/local/opt/tcl-tk/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/tcl-tk/lib/pkgconfig

==> Summary
๐Ÿบ /usr/local/Cellar/tcl-tk/8.6.8: 2,849 files, 29.2MB
==> Installing petere/postgresql/postgresql@10
==> Downloading https://ftp.postgresql.org/pub/source/v10.4/postgresql-10.4.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/postgresql@10/10.4 --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with-icu --with-ldap --with-libxml --
==> make install-world
==> Caveats
To use this PostgreSQL installation, do one or more of the following:

  • Call all programs explicitly with /usr/local/opt/postgresql@10/bin/...
  • Add /usr/local/opt/postgresql@10/bin to your PATH
  • brew link -f postgresql@10
  • Install the postgresql-common package

To access the man pages, do one or more of the following:

  • Refer to them by their full path, like man /usr/local/opt/postgresql@10/share/man/man1/psql.1
  • Add /usr/local/opt/postgresql@10/share/man to your MANPATH
  • brew link -f postgresql@10

This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/postgresql@10/bin:$PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/postgresql@10/lib
CPPFLAGS: -I/usr/local/opt/postgresql@10/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/postgresql@10/lib/pkgconfig

==> Summary
๐Ÿบ /usr/local/Cellar/postgresql@10/10.4: 3,690 files, 51.8MB, built in 3 minutes 10 seconds

brew list | grep postgresql

New postgresql.conf still has stats_temp_directory in new Postgres 16 instance

I was able to correct this by removing the stats_temp_directory setting from /usr/local/etc/postgresql-common/createcluster.conf. I'm not sure the best resolution of this; in the long run, I think it's clear stats_temp_directory should not be configured in the default createcluster.conf, but pre-16 versions are still current so it might be premature to remove it now. On the other hand, if I do a default installation and then use pg_createcluster to create a PG16 instance, it's surprising for it not start due to an obsolete setting in the newly-created postgresql.conf.

Regardless, I'm grateful for being able to use postgresql-common on Mac OS. I don't know how anybody can use PG for development without it.

Using homebrew for minor updates breaks existing clusters

I just ran homebrew upgrade on petere/postgresql@11 (11.0 -> 11.1) and petere/[email protected] (9.4.19 -> 19.4.20). I had one existing cluster for each, both of which were broken after the upgrade with the following error message (11 was similar, except for the version number):

โฏ pg_ctlcluster 9.4 meundies restart
The PostgreSQL server failed to start. Please check the log output:
LOG:  could not open configuration directory "/usr/local/etc/postgresql/9.4/meundies/conf.d": No such file or directory
FATAL:  configuration file "/usr/local/etc/postgresql/9.4/meundies/postgresql.conf" contains errors

It sounds like, by default, postgres expects conf.d to exist. Manually creating the directory for both clusters fixed the issue. Is this expected behavior, or is it possible to have the formulae handle this for us? I'd love to help with the solution, although I must admit I'm not very familiar with the structure of homebrew formulae and might need some direction.

Newly added bottles don't work on Yosemite

Just installed postgres-9.4 on 10.10.2 and postgres won't start:

bash-3.2$ /usr/local/Cellar/postgresql-9.4/9.4.1/bin/postgres -v
dyld: Library not loaded: /usr/local/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/Cellar/postgresql-9.4/9.4.1/bin/postgres
  Reason: image not found
Trace/BPT trap: 5

Installing from source with brew install --build-from-source works fine.

configure: error: Cannot find a working 64-bit integer type.

On Catalina 10.15.7, running

brew install petere/postgresql/[email protected]

results in

brew install petere/postgresql/[email protected]
==> Installing [email protected] from petere/postgresql
==> Downloading https://ftp.postgresql.org/pub/source/v9.6.19/postgresql-9.6.19.tar.bz2
Already downloaded: /Users/fuh000c/Library/Caches/Homebrew/downloads/2836759a8927c699f1ac1f8edb5dd16ef1afd7987d448558bc0c7b0cc13eb215--postgresql-9.6.19.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/[email protected]/9.6.19 --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with-ldap --with-libxml --with-libxslt --with-o
Last 15 lines from /Users/fuh000c/Library/Logs/Homebrew/[email protected]/01.configure:
checking for strtoll... yes
checking for strtoull... yes
checking whether strtoll is declared... yes
checking whether strtoull is declared... yes
checking for rl_completion_append_character... yes
checking for rl_completion_matches... yes
checking for rl_filename_completion_function... yes
checking for rl_reset_screen_size... yes
checking for append_history... yes
checking for history_truncate_file... yes
checking test program... ok
checking whether snprintf supports argument control... yes
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... no
configure: error: Cannot find a working 64-bit integer type.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/petere/homebrew-postgresql/issues

I had successfully installed v12, then realized I needed to use v9.6 so installed it alongside v12 successfully (I'm using the pg_ctlcluster tools)
But then realized the tooling (ie: psql) produced slightly different sql and messed up my Rails structure.sql/migrations.
So I brew uninstalled v12 and reinstalled v9.6 (thinking that might re-install the 9.6 psql binary) and am now stuck with the error above.

Unable to install [email protected] on MacOS Catalina (10.15.7) or MacOS Big Sur (11.1)

Hello, I've got a database created by postgreSQL 9.3 that has been orphaned. In order to upgrade it I apparently need to re-install 9.3. I found your formulae from this blog post and attempted to follow the steps.

brew tap petere/postgresql
brew install postgresql-9.3

Unfortunately, the install fails with:

Last 15 lines from /Users/adamawolf/Library/Logs/Homebrew/[email protected]/01.configure:
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... no
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... yes
checking for ldap_bind in -lldap... yes
checking for ldap_simple_bind in -lldap_r... yes
checking test program... ok
checking whether printf supports argument control... yes
checking whether long int is 64 bits... no
checking whether long long int is 64 bits... no
configure: error: Cannot find a working 64-bit integer type.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/petere/homebrew-postgresql/issues

From my research this seemed to be about a gcc issue in Big Sur. I tried this same process on a Catalina Mac, but it had the same results.

Entire /Users/adamawolf/Library/Logs/Homebrew/[email protected]/01.configure is attached.

01.configure.txt

pg-common tools can't find postgresql@10 path

First of all, thank you for all your hard work with this project, I really appreciate it.

I wanted to try out the postgresql 10 beta, and installed it. However, the pg_createcluster tools can't seem to find it because of the version number. Probably best shown with an example:

$ pg_createcluster -p 54100 10 main
Error: invalid version '10'

$ pg_createcluster -p 54100 10.0 main
Error: no initdb program for version 10.0 found
path: /usr/local/opt/[email protected]/bin/initdb% # I modified PgCommon.pm to print the path

$ ls /usr/local/opt/postgresql*
/usr/local/opt/postgresql-common@
'/usr/local/opt/postgresql@10'@
'/usr/local/opt/[email protected]'@

Apparently the pg_createcluster tool expects versions like X.Y, so just 10 doesn't work. However, the postgresql@10 package installs to just the major version, so pg_createcluster can't find it.

I was able to solve this by symlinking:

$ ln -s /usr/local/opt/postgresql@10 /usr/local/opt/[email protected]

Perhaps the formula should install to [email protected] by default?

Thanks!

Can't `brew install --HEAD petere/postgresql/postgresql-9.6`

Seems to be some problem between openjade and open-sp.

==> Applying Makefile.prog.in.patch
patching file Makefile.prog.in
==> ./configure --prefix=/opt/boxen/homebrew/Cellar/openjade/1.3.2 --datadir=/opt/boxen/homebrew/Cellar/openjade/1.3.2/share/sgml/openjade --enable-html --enable-http --ena
Last 15 lines from /Users/jgn/Library/Logs/Homebrew/openjade/01.configure:
--disable-debug
--disable-dependency-tracking

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... no
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking location of OpenSP include files... checking for /opt/boxen/homebrew/Cellar/openjade/1.3.2/include/OpenSP... no
checking for /usr/local/include/OpenSP... no
checking for /usr/include/OpenSP... no
configure: error: "OpenSP include files do not exist"

Am I getting open-sp from the wrong place?

==> Installing postgresql-9.6 from petere/postgresql
==> Installing dependencies for petere/postgresql/postgresql-9.6: open-sp, petere/sgml/openjade, pkg-config, gettext, e2fsprogs, homebrew/dupes/openldap, homebrew/du
==> Installing petere/postgresql/postgresql-9.6 dependency: open-sp
==> Downloading https://downloads.sourceforge.net/project/openjade/opensp/1.5.2/OpenSP-1.5.2.tar.gz
Already downloaded: /opt/boxen/cache/homebrew/open-sp-1.5.2.tar.gz
==> ./configure --prefix=/opt/boxen/homebrew/Cellar/open-sp/1.5.2 --mandir=/opt/boxen/homebrew/Cellar/open-sp/1.5.2/share/man --disable-doc-build --enable-http --enable-def
==> make pkgdatadir=/opt/boxen/homebrew/Cellar/open-sp/1.5.2/share/sgml/opensp install
๐Ÿบ  /opt/boxen/homebrew/Cellar/open-sp/1.5.2: 214 files, 6.5M, built in 1 minute 12 seconds
==> Installing petere/postgresql/postgresql-9.6 dependency: petere/sgml/openjade

Add workflow to README

@petere โ€” Are you using this package to build and test PostgreSQL extensions against multiple PostgreSQL installations? If so, can you add an example workflow to the README? I ran into two problems when trying to use this package and wondered whether I was doing anything wrong:

  • pg_createcluster and friends have special logic to determine the socket directory. Without passing any special arguments to them, this ends up being /usr/local/var/run/postgresql.

    So long as I use the pg_wrapper-linked versions of commands (such as psql) this is OK, but using a given version's psql directly uses the PostgreSQL default of /tmp.

    I feel that psql with just a port number should be able to connect to a cluster created with pg_createcluster with no arguments (i.e. the simplest case should "just work"). This comes up in practice when running a PGXS-based build as pg_regress invokes a version's psql directly (i.e. not through the wrappers)

  • This is not really your doing, but I was very surprised to find that pg_config isn't just a link to pg_wrapper but instead is a script that executes the pg_config with the highest available version (it doesn't even respect the PGCLUSTER variable, if set).

    If I have 9.3 and 9.4 installed, a simple PGXS-based extension can only be built and installed against 9.4: when PGXS invokes pg_config it will always receive the 9.4 version. This is the deal breaker: I don't see how I can use these tools to build extensions against multiple PostgreSQL versions, though that is ostensibly precisely what they're here for.

For the moment my workaround is this:

  • I've replaced postgresql-common's pg_config and replaced it with a symlink to pg_wrapper
  • I "wrote" a chruby-"inspired" script which keeps track of the "current" PostgreSQL cluster by setting PGHOST, PGPORT, and PGCLUSTER. My profile sets it to 9.4/main when I log in, so these variables are always at least set.

With the above changes it's pretty easy to test PGXS-based extensions, but I felt like this should have been easier to devise. Do you have a workflow you could share?

Can get 9.3 to install but not 9.4

First, thanks for your work on this. Totally awesome!

I have been struggling to get 9.4 to install. I am on Maverick and during my first attempt I had some issues getting Tcl/Tk to compile. I ended up having to reinstall apple-gcc42 to get it to compile. I then turned back to install 9.4 and the process seems to stop on the installation step. The output from the process is below. Strangely, verbose mode while offering a lot more detail simply stops at the same point without any error info. Not knowing what to do I installed postgresql-9.3 to see if that would install and that worked perfectly. Any ideas?

$ brew install postgresql-9.4
==> Downloading http://ftp.postgresql.org/pub/source/v9.4beta1/postgresql-9.4beta1.tar.bz2
Already downloaded: /Library/Caches/Homebrew/postgresql-9.4-9.4beta1.tar.bz2
==> Downloading http://www.postgresql.org/message-id/attachment/32317/configure-uuid.patch
######################################################################## 100.0%
==> Patching
patching file contrib/uuid-ossp/uuid-ossp.c
patching file configure
Hunk #1 succeeded at 1901 (offset 1 line).
Hunk #2 succeeded at 9430 (offset 1 line).
Hunk #3 succeeded at 9440 (offset 1 line).
patching file configure.in
==> ./configure --prefix=/usr/local/Cellar/postgresql-9.4/9.4beta1 --enable-dtrace --enable-nls --with-bo
==> make install-world
/bin/sh ../config/install-sh -c -d '/usr/local/Cellar/postgresql-9.4/9.4beta1/lib/pgxs/src'
/usr/bin/install -c -m 644 Makefile.global '/usr/local/Cellar/postgresql-9.4/9.4beta1/lib/pgxs/src/Makefile.global'
/usr/bin/install -c -m 644 Makefile.port '/usr/local/Cellar/postgresql-9.4/9.4beta1/lib/pgxs/src/Makefile.port'
/usr/bin/install -c -m 644 ./Makefile.shlib '/usr/local/Cellar/postgresql-9.4/9.4beta1/lib/pgxs/src/Makefile.shlib'
/usr/bin/install -c -m 644 ./nls-global.mk '/usr/local/Cellar/postgresql-9.4/9.4beta1/lib/pgxs/src/nls-global.mk'

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/petere/homebrew-postgresql/issues

Can't set --auth-host and --auth-local in initdb_options in createcluster.conf

I tried to do this in createcluster.conf:

initdb_options = '--locale C --encoding UTF8 --data-checksums --auth-host=scram-sha-256 --auth-local=peer'

But the generated pg_hba.conf still use md5 (my other settings come through nicely). Looking closely at the output I realized why:

Creating new PostgreSQL cluster 16/test5 ... /usr/local/opt/postgresql@16/bin/initdb --locale C --encoding UTF8 --data-checksums --auth-host=scram-sha-256 --auth-local=peer -D /usr/local/var/lib/postgresql/16/test5 --auth-local peer --auth-host md5

Would it be possible to pass the initdb_options to initdb after the default ones so they take precedence?

enable-nls creates issues while installing plv8

I was using your repo for installing postgresql 9.3 on OSX. Installation was successful. However, when I was trying to install plv8 using pgxn, it was giving me following error.

While doing some investigation it appears that --enable-nls is throwing this error as it requires presence of libintl.h. I did not see this file under the include/server folder. Is it possible to ignore this option from the CLI during installation?

Upgrading from "normal" brew postgresql to this?

I'm not grokking something. I have 9.3.5_1 installed and now want 9.4.x.

> brew info postgresql
postgresql: stable 9.5.2 (bottled)
Object-relational database system
https://www.postgresql.org/
Conflicts with: postgres-xc
/usr/local/Cellar/postgresql/9.3.5_1 (2,936 files, 32.1M) *
  Built from source
/usr/local/Cellar/postgresql/9.4.4 (3,023 files, 33.5M)
  Poured from bottle

> psql --version
psql (PostgreSQL) 9.3.5

How does one upgrade? Or maybe i'm going about this approach wrong. If i need one database on 9.4, do I just 'somehow' get the data directory somewhere and reference that from the startup script for 9.4 then dump the database i want into that new directory? I'm open for any ideas too, but just am unclear as to whether the lack of upgrade documentation is due to the fact you don't upgrade, but just "put another PG on your system, and use that one instead"? Not sure where else to turn to ask this kind of question so thanks!

Postgresql failing to install due to USE_PGXS

Postgresql was failing to install for me due to a long forgotten line in my profile:

export USE_PGXS=1

The result was that it was seeking to use pg_config at some point during the build process, and it was miserably failing to do so due to some leftover postgres install I had over in /usr.

While this admittedly is upstream-related (can you report it to them?), methinks the superenv or whatever it is should prevent this from occurring.

Error: SHA256 mismatch tcl-tk--tcllib-1.17.tar.gz for Postgresql 9.5

==> Downloading from https://codeload.github.com/tcltk/tcllib/tar.gz/tcllib_1_17

################################################################## 100.0%

Error: SHA256 mismatch
Expected: 1653165693125e86e8b77929c22210fb50a9b46271c321ac292cd5497cdde2d2
Actual: 95c676130ce2fdb00e8a6f79c4fea9e79d071063783a61db9274647920d97a03
Archive: /Library/Caches/Homebrew/tcl-tk--tcllib-1.17.tar.gz
To retry an incomplete download, remove the file above.

I tried deleting the cached file and re-running the install but it gives the same error.

Does the hash need to be updated or is there a different problem?

unsupported frontend protocol 1234.5679

Using version 12.1 installed from this repo, I cannot connect to my databases:

$ psql -h localhost -U guest
Wed Nov 20 15:33:58 CET 2019
psql: error: could not connect to server: FATAL:  unsupported frontend protocol 1234.5679: server supports 2.0 to 3.0
$ psql --version
Wed Nov 20 15:34:05 CET 2019
psql (PostgreSQL) 12.1 (Homebrew petere/postgresql)

Using version 11.5 from standard homebrew, I can:

$ psql -h localhost -U guest
Wed Nov 20 15:45:49 CET 2019
psql (11.5, server 12.0)
WARNING: psql major version 11, server major version 12.
         Some psql features might not work.
Type "help" for help.

Somehow, the frontend protocol version string from this distribution is entirely broken.

Postgres executable

Hullo.

I'm using Buffalo which expects there to be a postgres executable. It seems postgresql-common doesn't provide this so I was wondering if you had a nice solution for making the correct postgres executable available to each Buffalo project depending on what version of postgresql it needs?

Many thanks,
James.

configure: error: header file <perl.h> is required for Perl

brew install petere/postgresql/postgresql@12

==> Installing postgresql@12 from petere/postgresql
==> Downloading https://ftp.postgresql.org/pub/source/v12.0/postgresql-12.0.tar.bz2
Already downloaded: /Users/manishr/Library/Caches/Homebrew/downloads/9a050b57e5493faa799013fecb7c1c1d78dd6a8310669083b9c830c52cf83eb3--postgresql-12.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/postgresql@12/12.0 --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with-icu --with-ldap --with-libxm
Last 15 lines from /Users/manishr/Library/Logs/Homebrew/postgresql@12/01.configure:
checking for library containing bind_textdomain_codeset... -lintl
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for msgfmt... /usr/local/opt/gettext/bin/msgfmt
checking for msgfmt flags... -c
checking for msgmerge... /usr/local/opt/gettext/bin/msgmerge
checking for xgettext... /usr/local/opt/gettext/bin/xgettext
checking for tclsh... /usr/local/opt/tcl-tk/bin/tclsh
checking for tclConfig.sh... /usr/local/Cellar/tcl-tk/8.6.9_1/lib/tclConfig.sh
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for perl.h... no
configure: error: header file <perl.h> is required for Perl

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/petere/homebrew-postgresql/issues

These open issues may also help:
While installing postgresql@11: configure: error: header file <perl.h> is required for Perl #44

Add PostGIS to the repo

As it's so widely used it could be nice to have a historical archive of PostGIS versions in this repo. The ones in homebrew / homebrew-versions are all tied to the standard postgresql versions and it's hard to mix them. I've personally not been able to set up multiple postgis versions with homebrew.

Unable to install 10.17 on Big Sur

I'm on the currently latest versions of Big Sur, homebrew and the dependencies of homebrew-postgresql.

I'm getting this error message:

$ brew reinstall petere/postgresql/postgresql@10
==> Downloading https://ftp.postgresql.org/pub/source/v10.17/postgresql-10.17.tar.bz2
Already downloaded: /Users/thomasfuchs/Library/Caches/Homebrew/downloads/9ccc7a63725aa1fcc24fc863866c8fd1628bd4f679b3c36cda595102e197283a--postgresql-10.17.tar.bz2
==> Reinstalling petere/postgresql/postgresql@10
==> ./configure --prefix=/usr/local/Cellar/postgresql@10/10.17 --enable-dtrace --enable-nls --with-bonjour --w
==> make install-world
Last 15 lines from /Users/thomasfuchs/Library/Logs/Homebrew/postgresql@10/02.make:
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o nodeSubplan.o nodeSubplan.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o nodeSubqueryscan.o nodeSubqueryscan.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o nodeTidscan.o nodeTidscan.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o nodeForeignscan.o nodeForeignscan.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o nodeWindowAgg.o nodeWindowAgg.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o tstoreReceiver.o tstoreReceiver.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o tqueue.o tqueue.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o spi.o spi.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk   -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include  -c -o nodeTableFuncscan.o nodeTableFuncscan.c
( echo src/backend/parser/analyze.o src/backend/parser/gram.o src/backend/parser/scan.o src/backend/parser/parser.o src/backend/parser/parse_agg.o src/backend/parser/parse_clause.o src/backend/parser/parse_coerce.o src/backend/parser/parse_collate.o src/backend/parser/parse_cte.o src/backend/parser/parse_enr.o src/backend/parser/parse_expr.o src/backend/parser/parse_func.o src/backend/parser/parse_node.o src/backend/parser/parse_oper.o src/backend/parser/parse_param.o src/backend/parser/parse_relation.o src/backend/parser/parse_target.o src/backend/parser/parse_type.o src/backend/parser/parse_utilcmd.o src/backend/parser/scansup.o ) >objfiles.txt
( echo src/backend/executor/execAmi.o src/backend/executor/execCurrent.o src/backend/executor/execExpr.o src/backend/executor/execExprInterp.o src/backend/executor/execGrouping.o src/backend/executor/execIndexing.o src/backend/executor/execJunk.o src/backend/executor/execMain.o src/backend/executor/execParallel.o src/backend/executor/execProcnode.o src/backend/executor/execReplication.o src/backend/executor/execScan.o src/backend/executor/execSRF.o src/backend/executor/execTuples.o src/backend/executor/execUtils.o src/backend/executor/functions.o src/backend/executor/instrument.o src/backend/executor/nodeAppend.o src/backend/executor/nodeAgg.o src/backend/executor/nodeBitmapAnd.o src/backend/executor/nodeBitmapOr.o src/backend/executor/nodeBitmapHeapscan.o src/backend/executor/nodeBitmapIndexscan.o src/backend/executor/nodeCustom.o src/backend/executor/nodeFunctionscan.o src/backend/executor/nodeGather.o src/backend/executor/nodeHash.o src/backend/executor/nodeHashjoin.o src/backend/executor/nodeIndexscan.o src/backend/executor/nodeIndexonlyscan.o src/backend/executor/nodeLimit.o src/backend/executor/nodeLockRows.o src/backend/executor/nodeGatherMerge.o src/backend/executor/nodeMaterial.o src/backend/executor/nodeMergeAppend.o src/backend/executor/nodeMergejoin.o src/backend/executor/nodeModifyTable.o src/backend/executor/nodeNestloop.o src/backend/executor/nodeProjectSet.o src/backend/executor/nodeRecursiveunion.o src/backend/executor/nodeResult.o src/backend/executor/nodeSamplescan.o src/backend/executor/nodeSeqscan.o src/backend/executor/nodeSetOp.o src/backend/executor/nodeSort.o src/backend/executor/nodeUnique.o src/backend/executor/nodeValuesscan.o src/backend/executor/nodeCtescan.o src/backend/executor/nodeNamedtuplestorescan.o src/backend/executor/nodeWorktablescan.o src/backend/executor/nodeGroup.o src/backend/executor/nodeSubplan.o src/backend/executor/nodeSubqueryscan.o src/backend/executor/nodeTidscan.o src/backend/executor/nodeForeignscan.o src/backend/executor/nodeWindowAgg.o src/backend/executor/tstoreReceiver.o src/backend/executor/tqueue.o src/backend/executor/spi.o src/backend/executor/nodeTableFuncscan.o ) >objfiles.txt
( echo src/backend/access/transam/clog.o src/backend/access/transam/commit_ts.o src/backend/access/transam/generic_xlog.o src/backend/access/transam/multixact.o src/backend/access/transam/parallel.o src/backend/access/transam/rmgr.o src/backend/access/transam/slru.o src/backend/access/transam/subtrans.o src/backend/access/transam/timeline.o src/backend/access/transam/transam.o src/backend/access/transam/twophase.o src/backend/access/transam/twophase_rmgr.o src/backend/access/transam/varsup.o src/backend/access/transam/xact.o src/backend/access/transam/xlog.o src/backend/access/transam/xlogarchive.o src/backend/access/transam/xlogfuncs.o src/backend/access/transam/xloginsert.o src/backend/access/transam/xlogreader.o src/backend/access/transam/xlogutils.o ) >objfiles.txt
( cat brin/objfiles.txt common/objfiles.txt gin/objfiles.txt gist/objfiles.txt hash/objfiles.txt heap/objfiles.txt index/objfiles.txt nbtree/objfiles.txt rmgrdesc/objfiles.txt spgist/objfiles.txt tablesample/objfiles.txt transam/objfiles.txt; echo  ) >objfiles.txt
make[1]: *** [install-backend-recurse] Error 2
make: *** [install-world-src-recurse] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/petere/homebrew-postgresql/issues
$ uname -a
Darwin Buran.localdomain 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
$ brew --version
Homebrew 3.1.12
Homebrew/homebrew-core (git revision 5b20a984b6; last commit 2021-06-15)
Homebrew/homebrew-cask (git revision 77b86126e8; last commit 2021-06-15)
$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 11.4 (20F71)
      Kernel Version: Darwin 20.5.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: Buran
      User Name: Thomas Fuchs (thomasfuchs)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 1:46

Server version mismatch with Postgresql tools

If this isn't the place to ask, sorry for taking your time! I am getting the error below when I use psql

psql (10.11 (Homebrew petere/postgresql), server 11.6 (Homebrew petere/postgresql))

It wasn't an issue until I tried to use pg_dumpall. When I run

pg_dumpall > ~/Downloads/all_databases.sql

I got the error below:

server version: 11.6 (Homebrew petere/postgresql); pg_dumpall version: 10.11 (Homebrew petere/postgresql)
aborting because of server version mismatch

It's not a deal breaker as I can simply use

/usr/local/Cellar/postgresql@11/11.6/bin/pg_dumpall > ~/Downloads/all_databases.sql

However, my assumption was this shouldn't be a problem at all because, even though I have multiple Postgresql installed, I am only running v11.

$ pg_lsclusters
Ver Cluster Port Status Owner    Data directory                        Log file
11  main    5432 online ogirginc /usr/local/var/lib/postgresql/11/main /usr/local/var/log/postgresql/postgresql-11-main.log

I would like to know if it is possible to force psql or any other Postgresql tool to use the same version as the Postgresql version? Or am I misunderstanding the use of clusters?

Setup

  • macOS Catalina 10.15.2
  • postgresql-common
$ brew info petere/postgresql/postgresql-common
petere/postgresql/postgresql-common: stable 189+hb1, HEAD
PostgreSQL database-cluster manager
https://packages.qa.debian.org/p/postgresql-common.html
Conflicts with:
  postgresql (because both install the same binaries.)
/usr/local/Cellar/postgresql-common/189+hb1 (45 files, 244KB) *
  Built from source on 2020-01-30 at 11:22:18
From: https://github.com/petere/homebrew-postgresql/blob/master/postgresql-common.rb
==> Dependencies
Build: gnu-sed โœ”
Required: coreutils โœ”
==> Options
--HEAD
	Install HEAD version

While installing postgresql@11: configure: error: header file <perl.h> is required for Perl

==> ./configure --prefix=/usr/local/Cellar/postgresql@11/11.0 --enable-dtrace --enable-nls --with-bonjour --with-gssa
Last 15 lines from /Users/hajhatten/Library/Logs/Homebrew/postgresql@11/01.configure:
checking for library containing bind_textdomain_codeset... -lintl
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for msgfmt... /usr/local/opt/gettext/bin/msgfmt
checking for msgfmt flags... -c
checking for msgmerge... /usr/local/opt/gettext/bin/msgmerge
checking for xgettext... /usr/local/opt/gettext/bin/xgettext
checking for tclsh... /usr/local/opt/tcl-tk/bin/tclsh
checking for tclConfig.sh... /usr/local/Cellar/tcl-tk/8.6.8/lib/tclConfig.sh
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for perl.h... no
configure: error: header file <perl.h> is required for Perl

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/petere/homebrew-postgresql/issues

These open issues may also help:
Fully qualified name petere/postgresql/postgresql@10 is needed to install correct formula https://github.com/petere/homebrew-postgresql/issues/40

OSX Mojave 10.14 (18A391)
Homebrew 1.7.7
Homebrew/homebrew-core (git revision 5e88c5; last commit 2018-10-23)
Homebrew/homebrew-cask (git revision 5c3b4; last commit 2018-10-23)

Earlier had 10.5 installed, but ran:

brew uninstall postgresql --force
brew tap petere/postgresql
brew install postgresql@11

postgresql-common and gsed installed --with-default-names

Hello,
I wanted to report a problem and my attempt at analyzing it.

I want to install the postgresql-common package and I already have the gnu-sed package installed, with the --with-default-names flag set (which installs the command as sed, and not as gsed, superseding the MacOS-installed version of the same command).

When I try to brew install postgresql-common I get the following error:

gsed -i \
        -e "s,^use PgCommon,use lib '/usr/local/Cellar/postgresql-common/179+hb1/share/postgresql-common'; &,g" \
        -e 's,/etc/postgresql,/usr/local/etc/postgresql,' \
        -e 's,/var/lib/postgresql,/usr/local/var/lib/postgresql,' \
        -e 's,/var/log/postgresql,/usr/local/var/log/postgresql,' \
        -e 's,/var/run/postgresql,/usr/local/var/run/postgresql,' \
        -e 's,/bin:/usr/bin,/usr/local/Cellar/postgresql-common/179+hb1/bin:/bin:/usr/bin,' \
        -e '/version/s,/usr/lib/postgresql/,/usr/local/opt/postgresql@,g' \
        /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_wrapper /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_config /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_conftool /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_createcluster /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_ctlcluster /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_dropcluster /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_lsclusters /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_updatedicts /usr/local/Cellar/postgresql-common/179+hb1/bin/pg_upgradecluster \
        /usr/local/etc/postgresql-common/createcluster.conf \
        /usr/local/Cellar/postgresql-common/179+hb1/share/man/man1/*.1 /usr/local/Cellar/postgresql-common/179+hb1/share/man/man5/*.5 /usr/local/Cellar/postgresql-common/179+hb1/share/man/man8/*.8 \
        /usr/local/Cellar/postgresql-common/179+hb1/share/postgresql-common/PgCommon.pm

/bin/sh: gsed: command not found
make: *** [install] Error 127

I think the postgresql-common formula is not taking into account that the gnu-sed formula can install its executable as plain sed as opposed to gsed.

Thanks in advance, hope to help.
Marco

@ sign creates issues in $PATH

Trying to get my 10.6 fixed again, I've found some feedback that the posix postgresql@10 has been rewritten or suggested to be postgresql\@10. Might want to start using an underscore for that to avoid the sheer confusion of not finding pg_ctl due to that. FYI

macOS Mojave 10.14: configure: error: header file <libxml/parser.h> is required for XML support

On the current beta of macOS Mojave 10.14 (18A314k) I get this error:

$ brew install petere/postgresql/postgresql@10
==> Installing postgresql@10 from petere/postgresql
==> Downloading https://ftp.postgresql.org/pub/source/v10.4/postgresql-10.4.tar.bz2
Already downloaded: /Users/thomasfuchs/Library/Caches/Homebrew/[email protected]
==> ./configure --prefix=/usr/local/Cellar/postgresql@10/10.4 --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with-i
Last 15 lines from /Users/thomasfuchs/Library/Logs/Homebrew/postgresql@10/01.configure:
checking gssapi/gssapi.h presence... yes
checking for gssapi/gssapi.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking libxml/parser.h usability... no
checking libxml/parser.h presence... no
checking for libxml/parser.h... no
configure: error: header file <libxml/parser.h> is required for XML support

I do have libxml2 installed.

TCL compile issue Mavericks

This is somewhat related to issue #3 in that I can't get postgresql 9.3 to compile without editing the formula beforehand. The difference is that I'm on Mavericks.
Specifically, I have to add the following to the formula (for homebrew's own tcl):
--with-tclconfig=/usr/local/Cellar/tcl-tk/8.6.3/lib

Looking at the 'normal' postgresql homebrew formula, it seems they add something similar (in this case they seem to look for Apple's own tcl.sh inside Xcode):
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/postgresql.rb#L64

Is there someway that we can update the recipe here to deal with this (considering that the location of the homebrew tcl lib is dependent on the version number)? This is not a big issue, but a bit annoying to have to re-edit the formula every time there is an update.

Data not persisted upon forceful shutdown

This is a very weird issue happening through the last few releases on postgresql. I'm currently on v14.10. Whenever my computer has an abnormal restart or shutdown, there is some loss of data. It's almost like postgres is keeping some data in memory and not flushing it to the disk. When a normal shutdown happens, it flushes the data but on an abnormal shutdown, it doesn't

Any help is appreciated. Thank you

.plist files?

It would be nice to include plist files. brew services is getting very confused when trying to manage this.

Rebooting looses the cluster conf.d directory

I'm not sure if this is the right place to report this or not. When I reboot my cluster's conf.d is missing and prevents me starting pg.

I have:

Set up clusters with:

pg_createcluster --locale en_US.UTF-8 --start 9.4 main -- -A trust --auth-host=trust

After a reboot:

pg_lsclusters
Ver Cluster Port Status Owner        Data directory                         Log file
9.4 main    5432 down   jschoolcraft /usr/local/var/lib/postgresql/9.4/main /usr/local/var/log/postgresql/postgresql-9.4-main.log

Trying to start:

pg_ctlcluster 9.4 main start
The PostgreSQL server failed to start. Please check the log output:
LOG:  could not open configuration directory "/usr/local/etc/postgresql/9.4/main/conf.d": No such file or directory
FATAL:  configuration file "/usr/local/etc/postgresql/9.4/main/postgresql.conf" contains errors

If I:

mkdir /usr/local/etc/postgresql/9.4/main/conf.d

Then pg_ctlcluster 9.4 main start works as expected.

wrapper scripts using wrong path

On a fresh install today, I've been running into lots of troubles getting the pg_common tools to work.

In pg_createcluster, I got the error Error: no initdb program for version 9.6 found until I modified PgCommon.pm:

$binroot = "/usr/local/opt/postgresql@";
$binroot = "/usr/local/opt/postgresql-";

Additionally, I was unable to install the pg Rubygem because pg_config also failed with an error:

$ pg_config
You need to install [email protected] for building a server-side extension or a client-side application.

I had to modify it similarly:

PGBINROOT="/usr/local/opt/postgresql@"
PGBINROOT="/usr/local/opt/postgresql-"

When I install postgresql-9.6 via this homebrew formula, it ends up installing it in /usr/local/opst/postgresql-9.2, with a -, not a @ as the scripts seem to expect.

$ ls -l /usr/local/opt/postgresql*
lrwxr-xr-x 1 rando admin 30 Apr  2 17:50 /usr/local/opt/postgresql-9.6 -> ../Cellar/postgresql-9.6/9.6.2/
lrwxr-xr-x 1 rando admin 40 Apr  2 17:35 /usr/local/opt/postgresql-common -> ../Cellar/postgresql-common/HEAD-74c810d/

Perhaps something changed upstream that needs to be patched? I'm not very familiar with the postgresql-common tool itself from debian...

Thanks!

brew install fails

H, I'm getting the following.

$ brew install postgresql-9.5
2015/08/13 16:00:12 cannot get config: open : no such file or directory
==> Installing postgresql-9.5 from petere/homebrew-postgresql
==> Downloading http://ftp.postgresql.org/pub/source/v9.5alpha1/postgresql-9.5alpha1.tar.bz2
Already downloaded: /Library/Caches/Homebrew/postgresql-9.5-9.5alpha1.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/postgresql-9.5/9.5alpha1 --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with    -ldap --with-libxml --with-libxslt --with-openssl 
==> make install-world
/usr/bin/clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -    Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -w -pipe -march=native -mmacosx-version-    min=10.10 -I../../../../src/include -I/usr/local/opt/tcl-tk/include -I/usr/local/opt/readline/include -I/usr/local/opt/openldap/    include -I/usr/local/opt/openssl/include -I/usr/local/opt/e2fsprogs/include -I/usr/local/opt/gettext/include -F/usr/local/    Frameworks -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/    libxml2   -c -o xml.o xml.c
( echo src/backend/utils/adt/acl.o src/backend/utils/adt/arrayfuncs.o src/backend/utils/adt/array_expanded.o src/backend/utils/adt/    array_selfuncs.o src/backend/utils/adt/array_typanalyze.o src/backend/utils/adt/array_userfuncs.o src/backend/utils/adt/arrayutils.    o src/backend/utils/adt/ascii.o src/backend/utils/adt/bool.o src/backend/utils/adt/cash.o src/backend/utils/adt/char.o src/backend/    utils/adt/date.o src/backend/utils/adt/datetime.o src/backend/utils/adt/datum.o src/backend/utils/adt/dbsize.o src/backend/utils/adt    /domains.o src/backend/utils/adt/encode.o src/backend/utils/adt/enum.o src/backend/utils/adt/expandeddatum.o src/backend/utils/adt/    float.o src/backend/utils/adt/format_type.o src/backend/utils/adt/formatting.o src/backend/utils/adt/genfile.o src/backend/utils/adt    /geo_ops.o src/backend/utils/adt/geo_selfuncs.o src/backend/utils/adt/inet_cidr_ntop.o src/backend/utils/adt/inet_net_pton.o src/    backend/utils/adt/int.o src/backend/utils/adt/int8.o src/backend/utils/adt/json.o src/backend/utils/adt/jsonb.o src/backend/utils/    adt/jsonb_gin.o src/backend/utils/adt/jsonb_op.o src/backend/utils/adt/jsonb_util.o src/backend/utils/adt/jsonfuncs.o src/backend/    utils/adt/like.o src/backend/utils/adt/lockfuncs.o src/backend/utils/adt/mac.o src/backend/utils/adt/misc.o src/backend/utils/adt/    nabstime.o src/backend/utils/adt/name.o src/backend/utils/adt/network.o src/backend/utils/adt/network_gist.o src/backend/utils/adt/    network_selfuncs.o src/backend/utils/adt/numeric.o src/backend/utils/adt/numutils.o src/backend/utils/adt/oid.o src/backend/utils/    adt/oracle_compat.o src/backend/utils/adt/orderedsetaggs.o src/backend/utils/adt/pg_locale.o src/backend/utils/adt/pg_lsn.o src/    backend/utils/adt/pg_upgrade_support.o src/backend/utils/adt/pgstatfuncs.o src/backend/utils/adt/pseudotypes.o src/backend/utils/adt    /quote.o src/backend/utils/adt/rangetypes.o src/backend/utils/adt/rangetypes_gist.o src/backend/utils/adt/rangetypes_selfuncs.o src/    backend/utils/adt/rangetypes_spgist.o src/backend/utils/adt/rangetypes_typanalyze.o src/backend/utils/adt/regexp.o src/backend/utils    /adt/regproc.o src/backend/utils/adt/ri_triggers.o src/backend/utils/adt/rowtypes.o src/backend/utils/adt/ruleutils.o src/backend/    utils/adt/selfuncs.o src/backend/utils/adt/tid.o src/backend/utils/adt/timestamp.o src/backend/utils/adt/trigfuncs.o src/backend/    utils/adt/tsginidx.o src/backend/utils/adt/tsgistidx.o src/backend/utils/adt/tsquery.o src/backend/utils/adt/tsquery_cleanup.o src/    backend/utils/adt/tsquery_gist.o src/backend/utils/adt/tsquery_op.o src/backend/utils/adt/tsquery_rewrite.o src/backend/utils/adt/    tsquery_util.o src/backend/utils/adt/tsrank.o src/backend/utils/adt/tsvector.o src/backend/utils/adt/tsvector_op.o src/backend/utils    /adt/tsvector_parser.o src/backend/utils/adt/txid.o src/backend/utils/adt/uuid.o src/backend/utils/adt/varbit.o src/backend/utils/    adt/varchar.o src/backend/utils/adt/varlena.o src/backend/utils/adt/version.o src/backend/utils/adt/windowfuncs.o src/backend/utils/    adt/xid.o src/backend/utils/adt/xml.o ) >objfiles.txt
make[2]: *** [utils-recursive] Error 2
make[1]: *** [install-backend-recurse] Error 2
make: *** [install-world-src-recurse] Error 2

The result is the same if I compile from source. I am on Yosemite 10.10.

pg_upgrade only to 9.5

Hi, I'm trying to upgrade postgresql 9.5 to 9.6, but the pg_upgrade utility seems to be not updated with 9.6 formula - supporting 9.5 as the latest version.

Steps:

  1. I was running 9.5 version. I've run brew upgrade which installed 9.6 version (I've run also brew cleanup after upgrade, ignoring after install message)
  2. I couldn't start postgresql because of version mismatch. I've figured out that 9.6 was installed.
  3. I've moved mv /usr/local/var/postgres /usr/local/var/postgres9.5 and I've installed brew install postgresql95
  4. Then I reinstalled brew reinstall postgresql so the new /usr/local/var/postgres dir for 9.6 version was created.
  5. Script below failed, I tried logout / restart, did not help.
pg_upgrade \
>   --old-datadir=/usr/local/var/postgres9.5 \
>   --new-datadir=/usr/local/var/postgres \
>   --old-bindir=/usr/local/Cellar/postgresql95/9.5.5/bin \
>   --new-bindir=/usr/local/Cellar/postgresql/9.6.1/bin \
>   --verbose
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   
This utility can only upgrade to PostgreSQL version 9.5.
Failure, exiting!

Thanks for help.

Trouble installing PostgreSQL@10

Sorry for the brief report, but figured I'd drop a quick note here before heading out for the day in case you have a simple answer.

When I attempt to install PostgreSQL 10, I get the following:

clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/icu4c/58.2/include  -c -o execJunk.o execJunk.c
'/usr/bin/perl' ../../../src/tools/fix-old-flex-code.pl 'scan.c'
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I. -I. -I../../../src/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/icu4c/58.2/include  -c -o parser.o parser.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/icu4c/58.2/include  -c -o namespace.o namespace.c
http://docbook.sourceforge.net/release/xsl/current/html/index.xsl:1: parser error : Document is empty

^
compilation error: file http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl line 55 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/html/index.xsl
http://docbook.sourceforge.net/release/xsl/current/xhtml/refentry.xsl:1: parser error : Document is empty

^
compilation error: file http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook-no-doctype.xsl line 53 element include
xsl:include : unable to load http://docbook.sourceforge.net/release/xsl/current/xhtml/refentry.xsl
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I. -I. -I../../../src/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/icu4c/58.2/include  -c -o parse_agg.o parse_agg.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/icu4c/58.2/include  -c -o cluster.o cluster.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -I../../../src/include -I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include -I/usr/local/opt/openldap/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -I/usr/local/opt/tcl-tk/include -I/usr/local/Cellar/icu4c/58.2/include  -c -o execMain.o execMain.c

(Excerpted the only area I could quickly spot any errors during the build).

Looks like a docs problem. I'm not terribly familiar with their build process. Do I need to add something on my machine before I can build them?

postgresql 14 fails to start after upgrading from postgresql 13

% uname -mrsv
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64

relevant log lines from /usr/local/var/log/postgres.log

2021-10-11 09:49:12.206 CDT [1347] LOG:  server process (PID 91405) was terminated by signal 9: Killed: 9
2021-10-11 09:49:12.206 CDT [1347] LOG:  terminating any other active server processes
2021-10-11 09:49:12.206 CDT [1461] WARNING:  terminating connection because of crash of another server process
2021-10-11 09:49:12.206 CDT [1461] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2021-10-11 09:49:12.206 CDT [1461] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2021-10-11 09:49:12.218 CDT [1347] LOG:  all server processes terminated; reinitializing
2021-10-11 09:49:12.230 CDT [1347] LOG:  startup process (PID 91406) was terminated by signal 9: Killed: 9
2021-10-11 09:49:12.230 CDT [1347] LOG:  aborting startup due to startup process failure
2021-10-11 09:49:12.232 CDT [1347] LOG:  database system is shut down
2021-10-11 09:49:12.660 CDT [91407] FATAL:  database files are incompatible with server
2021-10-11 09:49:12.660 CDT [91407] DETAIL:  The data directory was initialized by PostgreSQL version 13, which is not compatible with this version 14.0.

brew postgresql-upgrade-database:

% brew postgresql-upgrade-database
==> Upgrading postgresql data from 13 to 14...
waiting for server to start....2021-10-11 10:28:17.679 CDT [6759] LOG:  starting PostgreSQL 13.4 on x86_64-apple-darwin20.6.0, compiled by Apple clang version 13.0.0 (clang-1300.0.29.3), 64-bit
2021-10-11 10:28:17.681 CDT [6759] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2021-10-11 10:28:17.681 CDT [6759] LOG:  listening on IPv6 address "::1", port 5432
2021-10-11 10:28:17.682 CDT [6759] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2021-10-11 10:28:17.695 CDT [6760] LOG:  database system was shut down at 2021-10-11 10:22:01 CDT
2021-10-11 10:28:17.700 CDT [6759] LOG:  database system is ready to accept connections
 done
server started
waiting for server to shut down....2021-10-11 10:28:17.922 CDT [6759] LOG:  received fast shutdown request
2021-10-11 10:28:17.923 CDT [6759] LOG:  aborting any active transactions
2021-10-11 10:28:17.924 CDT [6759] LOG:  background worker "logical replication launcher" (PID 6766) exited with exit code 1
2021-10-11 10:28:17.924 CDT [6761] LOG:  shutting down
2021-10-11 10:28:17.935 CDT [6759] LOG:  database system is shut down
 done
server stopped
==> Moving postgresql data from /usr/local/var/postgres to /usr/local/var/postgres.old...
==> Creating database...
The files belonging to this database system will be owned by user "thomas".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/var/postgres ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... America/Chicago
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /usr/local/opt/postgresql/bin/pg_ctl -D /usr/local/var/postgres -l logfile start

==> Migrating and upgrading data...
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for system-defined composite types in user tables  ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for user-defined encoding conversions              ok
Checking for user-defined postfix operators                 ok
Creating dump of global objects                             ok
Creating dump of database schemas
                                                            ok
Checking for presence of required libraries                 ok
Checking database user is the install user                  ok
Checking for prepared transactions                          ok
Checking for new cluster tablespace directories             ok

If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.

Performing Upgrade
------------------
Analyzing all rows in the new cluster                       ok
Freezing all rows in the new cluster                        ok
Deleting files from new pg_xact                             ok
Copying old pg_xact to new server                           ok
Setting oldest XID for new cluster                          ok
Setting next transaction ID and epoch for new cluster       ok
Deleting files from new pg_multixact/offsets                ok
Copying old pg_multixact/offsets to new server              ok
Deleting files from new pg_multixact/members                ok
Copying old pg_multixact/members to new server              ok
Setting next multixact ID and offset for new cluster        ok
Resetting WAL archives                                      ok
Setting frozenxid and minmxid counters in new cluster       ok
Restoring global objects in the new cluster                 ok
Restoring database schemas in the new cluster
                                                            ok
Copying user relation files
                                                            ok
Setting next OID for new cluster
*failure*

Consult the last few lines of "pg_upgrade_utility.log" for
the probable cause of the failure.
Failure, exiting
Error: Upgrading postgresql data from 13 to 14 failed!
==> Removing empty postgresql initdb database...
==> Moving postgresql data back from /usr/local/var/postgres.old to /usr/local/var/postgres...
Error: Failure while executing; `/usr/local/opt/postgresql/bin/pg_upgrade -r -b /usr/local/Cellar/postgresql@13/13.4/bin -B /usr/local/opt/postgresql/bin -d /usr/local/var/postgres.old -D /usr/local/var/postgres -j 12` exited with 1.

last lines from /usr/local/var/log/pg_upgrade_utility.log:

command: "/usr/local/opt/postgresql/bin/pg_resetwal" -o 836127 "/usr/local/var/postgres" >> "pg_upgrade_utility.log" 2>&1
pg_resetwal: error: lock file "postmaster.pid" exists
pg_resetwal: Is a server running?  If not, delete the lock file and try again.

no postmaster.pid:

% ls /usr/local/var/postgres/postmaster.pid
ls: /usr/local/var/postgres/postmaster.pid: No such file or directory

Any guidance would be appreciated!

uuid.h is not found during installation of postgresql-9.4 on mavericks

Software: OS X 10.9.1 (13B42)
Brew revision: cd7dfa11585978c56b63e1dd2b210c232cc9c795 (latest as of today)
was clean-installation without upgrade from previous OS version.

โžœ ~ brew doctor
Your system is ready to brew.
โžœ ~ brew info postgresql-9.4
postgresql-9.4: HEAD
http://www.postgresql.org/

This formula is keg-only.
The different provided versions of PostgreSQL conflict with each other.

Not installed
From: https://github.com/petere/homebrew-postgresql/commits/master/postgresql-9.4.rb
==> Dependencies
Required: gettext โœ”, ossp-uuid โœ”, readline โœ”, tcl-tk โœ”

but then during install:
โžœ ~ brew install --HEAD postgresql-9.4
==> Cloning http://git.postgresql.org/git/postgresql.git
Cloning into '/Library/Caches/Homebrew/postgresql-9.4--git'...
Checking connectivity... done
Checking out files: 100% (4140/4140), done.
==> Patching
patching file contrib/uuid-ossp/uuid-ossp.c
==> ./configure --prefix=/usr/local/Cellar/postgresql-9.4/HEAD --enable-dtrace -
configure: WARNING: ## ---------------------------------------- ##
configure: WARNING: ## Report this to [email protected] ##
configure: WARNING: ## ---------------------------------------- ##
checking for uuid.h... no
configure: error: header file < ossp/uuid.h > or < uuid.h > is required for OSSP-UUID

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/petere/homebrew-postgresql/issues

did try both โžœ ~ brew link -f ossp-uuid and brew unlink ossp-uuid.

version 9.3 installed without any problem.

[email protected]: Detects/cannot link against system Python

Running brew install petere/postgresql/postgresql@12 on a new MBP, M1 Pro chip, running Monterey, I'm getting the following:

ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.tbd for architecture arm64

The system Python is being detected and used for includes/libraries, and it seems unsuitable.

For what it's worth I've installed Python 2.7 via Pyenv and Python 3 via Homebrew. The configuration appears correct, but it's evidently not being detected during the build.

~ echo $PATH
#=> /Users/alan/.rbenv/shims:/Users/alan/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/opt/homebrew/opt/fzf/bin

~ which python
#=> /Users/alan/.pyenv/shims/python

~ python --version
#=> Python 2.7.18

Any suggestions?

Excerpt from output:

~ brew install petere/postgresql/postgresql@12 --verbose
==> Downloading https://ftp.postgresql.org/pub/source/v12.8/postgresql-12.8.tar.bz2
Already downloaded: /Users/alan/Library/Caches/Homebrew/downloads/5323b6d7ce5556b4bdd026584b36ffbaf42c5457b208ce2914521a420429c605--postgresql-12.8.tar.bz2
==> Verifying checksum for '5323b6d7ce5556b4bdd026584b36ffbaf42c5457b208ce2914521a420429c605--postgresql-12.8.tar.bz2'
==> Installing postgresql@12 from petere/postgresql
tar --extract --no-same-owner --file /Users/alan/Library/Caches/Homebrew/downloads/5323b6d7ce5556b4bdd026584b36ffbaf42c5457b208ce2914521a420429c605--postgresql-12.8.tar.bz2 --directory /private/tmp/d20211031-25133-1x78ap
cp -pR /private/tmp/d20211031-25133-1x78ap/postgresql-12.8/. /private/tmp/postgresqlA12-20211031-25133-15wfto6/postgresql-12.8
chmod -Rf +w /private/tmp/d20211031-25133-1x78ap
==> ./configure --prefix=/opt/homebrew/Cellar/postgresql@12/12.8 --enable-dtrace --enable-nls --with-bonjour --with-gssapi --with-icu --with-ldap --with-libxml --with-libxslt --with-openssl --with-uuid=e2fs --with-pam --with-perl --with-python --with-tcl XML2_CONFIG=: --with-includes=/opt/homebrew/opt/gettext/include:/opt/homebrew/opt/icu4c/include:/opt/homebrew/opt/openldap/include:/opt/homebrew/opt/[email protected]/include:/opt/homebrew/opt/readline/include:/opt/homebrew/opt/tcl-tk/include --with-libraries=/opt/homebrew/opt/gettext/lib:/opt/homebrew/opt/icu4c/lib:/opt/homebrew/opt/openldap/lib:/opt/homebrew/opt/[email protected]/lib:/opt/homebrew/opt/readline/lib:/opt/homebrew/opt/tcl-tk/lib --with-extra-version= (Homebrew petere/postgresql)

...

checking for python... /usr/bin/python
configure: using python 2.7.18 (default, Oct  2 2021, 04:20:38)
checking for Python distutils module... yes
checking Python configuration directory... /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
checking Python include directories... -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
checking how to link an embedded Python application... -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib -lpython2.7 -ldl  -framework CoreFoundation

...

clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -bundle -multiply_defined suppress -o plperl.so plperl.o SPI.o Util.o  -L../../../src/port -L../../../src/common  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk   -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/openldap/lib -L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/tcl-tk/lib -Wl,-dead_strip_dylibs   -fstack-protector-strong  -L/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE -lperl -bundle_loader ../../../src/backend/postgres
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.tbd for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [plpython2.so] Error 1
make[2]: *** [install-plpython-recurse] Error 2
make[2]: *** Waiting for unfinished jobs....
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2  -bundle -multiply_defined suppress -o plpgsql.so pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o pl_scanner.o  -L../../../../src/port -L../../../../src/common  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk   -L/opt/homebrew/opt/gettext/lib -L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/openldap/lib -L/opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/tcl-tk/lib -Wl,-dead_strip_dylibs   -lintl -bundle_loader ../../../../src/backend/postgres
/usr/bin/install -c -m 755  plperl.so '/opt/homebrew/Cellar/postgresql@12/12.8/lib/plperl.so'
/usr/bin/install -c -m 755  plpgsql.so '/opt/homebrew/Cellar/postgresql@12/12.8/lib/plpgsql.so'
make[1]: *** [install-pl-recurse] Error 2
make: *** [install-world-src-recurse] Error 2

==> Formula
Tap: petere/postgresql
Path: /opt/homebrew/Library/Taps/petere/homebrew-postgresql/[email protected]
==> Configuration
HOMEBREW_VERSION: 3.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9daf5e2d28396c7a4379605e89e029d9fccb41e6
Last commit: 15 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 63c932f6434e9194154927bac6e8e4fb53e59f16
Core tap last commit: 21 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_EDITOR: mate
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.0.0 build 1300
Git: 2.33.1 => /opt/homebrew/bin/git
Curl: 7.77.0 => /usr/bin/curl
macOS: 12.0.1-arm64
CLT: 13.1.0.0.1.1633545042
Xcode: 13.1
Rosetta 2: false
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j10
CMAKE_PREFIX_PATH: /opt/homebrew/opt/icu4c:/opt/homebrew/opt/[email protected]:/opt/homebrew/opt/openldap:/opt/homebrew/opt/readline:/opt/homebrew/opt/tcl-tk:/opt/homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/[email protected]/lib/pkgconfig:/opt/homebrew/opt/openldap/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/tcl-tk/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/12
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
ACLOCAL_PATH: /opt/homebrew/share/aclocal
PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/gettext/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/[email protected]/bin:/opt/homebrew/opt/openldap/bin:/opt/homebrew/opt/tcl-tk/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: petere/postgresql/postgresql@12 12.8 did not build
Logs:
     /Users/alan/Library/Logs/Homebrew/postgresql@12/00.options.out
     /Users/alan/Library/Logs/Homebrew/postgresql@12/01.configure.cc
     /Users/alan/Library/Logs/Homebrew/postgresql@12/02.make.cc
     /Users/alan/Library/Logs/Homebrew/postgresql@12/config.log
     /Users/alan/Library/Logs/Homebrew/postgresql@12/01.configure
     /Users/alan/Library/Logs/Homebrew/postgresql@12/02.make
Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
postgresql 14 fails to start after upgrading from postgresql 13 https://github.com/petere/homebrew-postgresql/issues/61
While installing postgresql@11: configure: error: header file <perl.h> is required for Perl https://github.com/petere/homebrew-postgresql/issues/44

postgresql-common's pg_cluster fails to create log directory

> pg_createcluster 9.1 main
Creating new cluster 9.1/main ...
  config /usr/local/etc/postgresql/9.1/main
  data   /usr/local/var/lib/postgresql/9.1/main
  locale UTF-8
Warning: The socket directory for owners other than 'postgres'
defaults to /tmp. You might want to change the unix_socket_directory parameter
in postgresql.conf to a more secure directory.
  port   5432
Error: could not create log directory; you might need to run this program with root privileges

Running the above command with sudo results in the same behaviour.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.