Installing from source v23

You can define a list of extensions to build and install from their Git repositories by setting install_from_source in config.yml:

    - name: ext
      git_repository_ref: dev/example

    - name: otherext
      git_repository_url: ssh://
      git_repository_ref: master
      source_directory: /opt/postgres/src/otherext
      build_directory: /opt/postgres/build/otherext
        - "make -f /opt/postgres/src/otherext/Makefile install"
        VAR: value

TPA builds and installs extensions one by one in the order listed. So you can build extensions that depend on another (such as pglogical and BDR) by mentioning them in the correct order.

Each entry must specify a name, git_repository_url, and git_repository_ref (default: master) to build. You can use SSH agent forwarding or an HTTPS username/password to authenticate to the Git repository. Also set source_directory, build_directory, build_environment, and build_commands, as shown in the example.

To reuse the build directory when doing repeated deploys, run tpaexec deploy … --skip-tags build-clean. Otherwise the old build directory is emptied before starting the build. You can also configure local source directories to speed up your development builds.

Whenever you run a source build, Postgres is restarted.

Build dependencies

If you're building from source, TPA ensures that the basic Postgres build dependencies are installed. If you need any additional packages, mention them in packages. For example:

    - golang-1.16