David
David

Reputation: 31

how to install Citus extension for postgresql-17

How to install Citus extension for postgresql-17? I have been looking for it on many search portals.

My intention is to install Citus extension for Postgres-17 version, any help much appreciated.

I have Alloy DB cluster & VM Instance Ubuntu 24.04 Pro Server LTS on google cloud, works well with docker Postgres Citus. By default Google on this Instance installs Postgresql-17, and I am not able to find the right equivalent Citus extension for this Postgres-17 version.

I have tried the following steps:

This is from Citus portal: It does not work since my instance has Postgres-17:

curl https://install.citusdata.com/community/deb.sh | sudo bash
sudo apt-get -y install postgresql-16-citus-12.1
sudo pg_conftool 16 main set shared_preload_libraries citus

This is from Citus GitHub, this does not work since it has Citus 12.1 extension for Postgres-16:

git clone https://github.com/citusdata/citus.git
cd citus
./configure
make
sudo make install

This works since its docker, but its not my most preferred option:

# run PostgreSQL with Citus on port 5500
docker run -d --name citus -p 5500:5432 -e POSTGRES_PASSWORD=mypassword citusdata/citus

# connect using psql within the Docker container
docker exec -it citus psql -U postgres

# or, connect using local psql
psql -U postgres -d postgres -h localhost -p 5500

Upvotes: 2

Views: 226

Answers (1)

Dantio
Dantio

Reputation: 2217

This worked for me:

apt-get install -y --no-install-recommends \
     postgresql-server-dev-17 \
     libkrb5-dev \
     git \
     cmake \
     libcurl4-openssl-dev \
     libzstd-dev \
     build-essential \
     libselinux1-dev \
     libxslt1-dev \
     libpam-dev \
     liblz4-dev \
     libreadline-dev \
     autoconf \
     zlib1g-dev

git clone -b release-13.0 --depth 1 https://github.com/citusdata/citus.git
cd citus && make -s clean && make -s -j8 install

cp /usr/lib/postgresql/17/lib/citus*.so /usr/lib/postgresql/17/lib
cp /usr/share/postgresql/17/extension/citus* /usr/share/postgresql/17/extension/

Upvotes: 0

Related Questions