Skip to content

INSTALL

There are multiple ways to install the extension :

If you're having any problem, check the Troubleshooting section.

Choose your version : Stable or Latest ?

This extension is available in two versions :

  • stable is recommended for production
  • latest is useful if you want to test new features

Install on RedHat / Rocky Linux

Note

The supported distributions are : * RHEL 9 & 10 * Rocky Linux 9 & 10

Warning

You need to use the official Postgres packages for postgresql.org, not the ones from Red Hat.

Step 1: Add the DaLibo Labs repository to your system.

curl -fsSL https://repo.dalibo.com/install.sh | sh

Alternatively you can download the latest version from the Gitlab Package Registry.

Step 2: Deploy

dnf install tce_16

(Replace 16 with the major version of your PostgreSQL instance.)

Step 3: See Load the extension to proceed.

Install on Debian / Ubuntu

Note

The supported distributions are : * Debian 13 Trixie * Ubuntu 24.04 Noble

This is the recommended way to install the stable version

Step 1: Add the DaLibo Labs Repository to your system.

curl -fsSL https://repo.dalibo.com/install.sh | sh

Alternatively you can download the latest version from the Gitlab Package Registry.

Step 2: Deploy

apt install tce_16

(Replace 16 with the major version of your PostgreSQL instance.)

Step 3: See Load the extension to proceed

Install From Source

This is the recommended way to install the latest extension

Warning

Building the extension requires a full Rust development environment. It is not recommended to build it on a production server.

Before anything else, you need to install the PGRX System Requirements and install and initialise PGRX itself using

cargo install cargo-pgrx
cargo pgrx init

Note

You may need to specify your pg_config location in the second command by using the --pg{version} flag (e.g. --pg16 /usr/lib/postgresql/16/bin/pg_config).

Step 1: clone the latest branch:

git clone https://gitlab.com/dalibo/the_cryptic_elephant.git

Step 2: Build the project like any other PostgreSQL extension:

make
sudo make install

Step 3: See Load the extension to proceed

Install on MacOS

WE DO NOT PROVIDE COMMUNITY SUPPORT FOR THIS EXTENSION ON MACOS SYSTEMS.

However it should be possible to build the extension if you install the PGRX Mac OS system requirements and then follow the regular install from source procedure.

If you need native builds for MacOS, please consider sponsoring the project !

Install on Windows

At the moment there's no native build for Windows.

However is it possible to run PostgreSQL inside a WSL2 container, which is basically an Ubuntu subsystem running on Windows.

You can then install the extension inside the WSL2 container like you would on a regular Ubuntu server.

Please read the Windows documentation for more details:

If you need native builds for Windows, please consider sponsoring the project !

Load the extension

ALTER DATABASE foo SET session_preload_libraries = 'tce';

Close your session and open a new one. Create the extension.

CREATE EXTENSION tce;

All new connections to the database can now use the extension.

Addendum: Troubleshooting

If you are having difficulties, you may have missed a step during the installation processes. Here's a quick checklist to help you:

Check that the extension is present

First, let's see if the extension was correctly deployed:

ls $(pg_config --sharedir)/extension/tce
ls $(pg_config --pkglibdir)/tce.so

Check that the extension is loaded

Now connect to your database and look at the configuration with:

SHOW local_preload_libraries;
SHOW session_preload_libraries;
SHOW shared_preload_libraries;

Check that the extension is created

Again connect to your database and type:

SELECT * FROM pg_extension WHERE extname= 'tce';