Andy Hansen

Home About RSS

Installing PostgreSQL with UUID on Ubuntu

I’ve recently moved to Ubuntu for my work machine, and wanted to set up PostgreSQL using the asdf version manager. As it turns out, it is not installed with UUID support out the box, so extra options need to be passed in.

This guide is for PostgreSQL version 9.6.12 with this postgres plugin for asdf, on Ubuntu 19.04.

In short, the steps are:

  1. Install asdf
  2. Install the postgres plugin
  3. Install UUID dependencies with sudo apt-get install uuid-dev
  4. Run the command below to install
POSTGRES_EXTRA_CONFIGURE_OPTIONS="--with-uuid=e2fs" asdf install posgres 9.6.12

Once installed, follow the steps in the plugin’s readme to start postgres.

Save these options

If you don’t want to have to search for this blog post to copy paste these options every time, you can store the options in your ~/.asdf-postgres-configure-options file. The contents will look like the following:

POSTGRES_EXTRA_CONFIGURE_OPTIONS="--with-uuid=e2fs"

With you options in this file, you can simply run asdf install postgres <version>, and it is automatically installed with UUID support.

Datadog support

If Datadog support is helpful, I’d recommend adding one more option to your install. My ~/.asdf-postgres-configure-options looks like this:

POSTGRES_EXTRA_CONFIGURE_OPTIONS="--enable-dtrace --with-uuid=e2fs"