Glenn Jones

Hello 👋 Welcome to my corner of the internet. I write here about the different challenges I encounter, and the projects I work on. Find out more about me.

Compiling postgis from source against a pinned version of Postgresql

After again homebrew having updated a number of libraries and breaking my postgres/postgis install, I yet again had to compile a specific version of postgis against a pinned version of postgresql (auto-update is disabled.. yet 🤷). This serves a quick reference:

Steps:

  1. Download postgis & unpack
  2. CD to unpacked dir
  3. Execute ./configure --with-pgconfig=/usr/local/Cellar/postgresql@12/12.10_1/bin/pg_config --disable-nls --with-projdir=/usr/local/Cellar/proj@7/7.2.1. See config docs. When the install step fails, that’s often with reference to specific libraries, which you can set using a flag to the ./configure command.
  4. Execute make install
  5. Database does not need to be restarted
  6. If you update the postgis version: when you connect to the DB run: SELECT postgis_extensions_upgrade(). Then SELECT postgis_version() should return the latest version

Encountered errors:

Links

Previous: Fixing 'can’t start new thread' and 'thread: resource temporarily unavailable' when running a parallelized containerized selenium setup
Next: Questions to ask when interviewing with companies for a software engineering role