DEV Community

Hannan2910
Hannan2910

Posted on • Updated on

Installing Postgresql 16beta1 along with AGE

Converting your current relational database into a graph database can be done easily by incorporating an extension. Apache AGE serves as a PostgreSQL extension that grants graph database capabilities, allowing users to utilize a graph database alongside their existing relational databases.

We will explore the following:

  1. The process of installing Postgres from its source.
  2. Installing and configuring Apache AGE in conjunction with Postgres.

Creating Folders

mkdir age_installation
cd age_installation
mkdir pg
cd pg
Enter fullscreen mode Exit fullscreen mode

Dependencies

sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Enter fullscreen mode Exit fullscreen mode

PostgreSQL

Currently AGE is officially supported for PG 11 and 12 but suuport for PG 15 & 16 are in progress. So right now we will install postgresql 16beta1

wget https://ftp.postgresql.org/pub/source/v16beta1/postgresql-16beta1.tar.gz && tar -xvf postgresql-16beta1.tar.gz && rm -f postgresql-16beta1.tar.gz

Enter fullscreen mode Exit fullscreen mode

Installation

Next, we will proceed with the installation of "pg". The "--prefix" option specifies the directory path where we want to install "psql". In this instance, we will be installing it in the current directory using "pwd".


cd postgresql-16beta1

# configure by setting flags
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"

# now install
make install

# go back
cd ../../

Enter fullscreen mode Exit fullscreen mode

AGE

We will be using ths repo as it has the latest most compatbile verion of AGE

git clone https://github.com/panosfol/age
Enter fullscreen mode Exit fullscreen mode
cd age
git checkout PG16
Enter fullscreen mode Exit fullscreen mode

Installing

# install
make PG_CONFIG=/home/yourusername/age_installation/pg/postgresql-16beta1/bin/pg_config install
Enter fullscreen mode Exit fullscreen mode
# install check
make PG_CONFIG=/home/yourusername/age_installation/pg/postgresql-16beta1/bin/pg_config installcheck
Enter fullscreen mode Exit fullscreen mode

Currently 19 out of 24 test cases fail for AGE in postgresql 16beta1. You can contribute to this open source project and help in its development.

Top comments (0)