DEV Community

Arunesh Choudhary
Arunesh Choudhary

Posted on

Debug and CFlags of Postgres

Modern software development relies heavily on databases to store and manage enormous volumes of data. A strong, feature-rich, and highly adaptable open-source relational database management system (RDBMS), PostgreSQL stands out among the many solutions available. This blog post will provide you a thorough introduction to PostgreSQL, whether you're an experienced developer trying to advance your knowledge or a newcomer exploring the world of databases.

Open-source object-relational database management system PostgreSQL, also known as "Postgres," places a strong emphasis on extensibility and standards compliance. It was first created at the University of California, Berkeley in the 1980s, and since then, it has become more well-known because of its cutting-edge features, dependability, and active open-source community.

Install postgres 14.7 version

System Details

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy
Enter fullscreen mode Exit fullscreen mode

Install dependencies

sudo apt install build-essential libreadline-dev zlib1g-dev libssl-dev libxml2-dev libxslt-dev
Enter fullscreen mode Exit fullscreen mode

Download postgres 14.7

curl -OL https://ftp.postgresql.org/pub/source/v14.7/postgresql-14.7.tar.gz
Enter fullscreen mode Exit fullscreen mode

Extract the file

tar xvf postgresql-14.7.tar.gz
cd postgresql-14.7
Enter fullscreen mode Exit fullscreen mode

Configure the build

./configure --prefix=$(pwd) --enable-cassert --enable-debug CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"
Enter fullscreen mode Exit fullscreen mode

Run make

make
sudo make install
Enter fullscreen mode Exit fullscreen mode

Top comments (0)