DocumentationNeurondB Documentation

Install NeurondB on PostgreSQL 16–18

Prerequisites

Before installing NeurondB, ensure you have:

  • PostgreSQL 16, 17, or 18 with superuser access
  • gcc/clang toolchain, make, autoconf, libtool
  • PostgreSQL server development headers
  • Optional: CUDA or ROCm drivers for GPU acceleration

Verify that pg_config points to your target PostgreSQL installation before compiling.

Ubuntu / Debian

Install system packages, fetch NeurondB sources, and compile against PostgreSQL 17 deb packages.

Install PostgreSQL

PostgreSQL packages

sudo apt-get update
sudo apt-get install -y postgresql-17 \
    postgresql-server-dev-17 \
    postgresql-contrib-17

Install build dependencies

Build prerequisites

sudo apt-get install -y build-essential \
    libcurl4-openssl-dev \
    libssl-dev \
    zlib1g-dev \
    pkg-config

Compile & install

Build NeurondB

git clone https://github.com/pgElephant/NeurondB.git
cd NeurondB
make PG_CONFIG=/usr/lib/postgresql/17/bin/pg_config
sudo make install PG_CONFIG=/usr/lib/postgresql/17/bin/pg_config

Verify artifacts

Installed files

ls -lh /usr/lib/postgresql/17/lib/neurondb.so
ls -lh /usr/share/postgresql/17/extension/neurondb*

macOS (Homebrew)

Build NeurondB against Homebrew PostgreSQL. Requires Xcode CLI tools and sudo for installation.

Install PostgreSQL 17

Homebrew setup

brew install postgresql@17
brew services start postgresql@17

Compile & install

Build NeurondB

git clone https://github.com/pgElephant/NeurondB.git
cd NeurondB
make PG_CONFIG=/opt/homebrew/opt/postgresql@17/bin/pg_config
sudo make install PG_CONFIG=/opt/homebrew/opt/postgresql@17/bin/pg_config

Rocky Linux / RHEL

Install PostgreSQL from the PGDG repository, then build NeurondB against the RPM tooling.

Install PostgreSQL packages

PostgreSQL 17

sudo dnf install -y \
    postgresql17-server \
    postgresql17-devel \
    postgresql17-contrib

Install build dependencies

Build prerequisites

sudo dnf install -y \
    gcc \
    make \
    curl-devel \
    openssl-devel \
    zlib-devel

Compile & install

Build NeurondB

git clone https://github.com/pgElephant/NeurondB.git
cd NeurondB
make PG_CONFIG=/usr/pgsql-17/bin/pg_config
sudo make install PG_CONFIG=/usr/pgsql-17/bin/pg_config

Post-installation checks

Enable the extension, verify metadata, and confirm NeurondB is available across your cluster.

Register extension

Initialize NeurondB

-- Connect to target database
\c my_database

-- Create extension
CREATE EXTENSION neurondb;

-- Confirm version
SELECT extversion
FROM   pg_extension
WHERE  extname = 'neurondb';

Optional GPU configuration

postgresql.conf

# Enable GPU acceleration
neurondb.gpu_enabled = on
neurondb.gpu_backend = 'cuda'  # or 'rocm'
neurondb.gpu_memory_pool_mb = 2048

Next Steps