How to install and configure PostgreSQL 16 on Ubuntu 22.04

In this article, we have shown how to install and configure PostgreSQL 16 on Ubuntu 22.04 step by step.

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Continue reading How to install and configure PostgreSQL 16 on Ubuntu 22.04

How to start stop PostgreSQL server using pg_ctl

In this article, we will see how to start stop PostgreSQL server using pg_ctl.

We can start or stop or promote PostgreSQL server(cluster) by using following three methods.

1. Using pg_ctl
2. Using Systemctl
3. Using service

Last two methods are straight forward.

How to start stop restart PostgreSQL server using pg_ctl

pg_ctl is the utility used to start stop status or promote/failover of PostgreSQL cluster(server).
To use pg_ctl to start the PostgreSQL, we must have an already existing or newly initialized data directory.
We have to use PostgreSQL server data directory location while using pg_ctl.

Before going to examples, set the PostgreSQL environment variables using this link

Syntax of pg_ctl: Continue reading How to start stop PostgreSQL server using pg_ctl

How to set PostgreSQL environmental variables permanently in Ubuntu Linux

In this article, we will see how to set PostgreSQL environmental variables permanently in Ubuntu Linux step by step.

How to set PostgreSQL environmental variables

Continue reading How to set PostgreSQL environmental variables permanently in Ubuntu Linux

How to install PostgreSQL 14 on Ubuntu

In this article, we have shown how to install PostgreSQL 14 on Ubuntu step by step.

How to install PostgreSQL 14 on Ubuntu

1. Go to official PostgreSQL website .
Continue reading How to install PostgreSQL 14 on Ubuntu

How to uninstall PostgreSQL from Ubuntu

In this article, we will see how to uninstall PostgreSQL from Ubuntu.

Important Note: I suggest you to take backup of your important PostgreSQL databases. Once we uninstall, all your PostgreSQL data will be lost.

1. Stop PostgreSQL server using below command.

sudo systemctl stop postgresql

Continue reading How to uninstall PostgreSQL from Ubuntu

How to install PostGIS in Ubuntu

In this article, we will see How to install PostGIS in Ubuntu.

What is Postgis?

PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL. postgis is just extension to existing database. That also we have to add as shown below.

Prerequisites to install postgis extension on Linux:
Continue reading How to install PostGIS in Ubuntu

How to install PostgreSQL 13 on Ubuntu 20.04

In this article, we will see how to install PostgreSQL 13 on Ubuntu 20.04.

What is PostgreSQL?
PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

1. Create the file repository configuration:
Continue reading How to install PostgreSQL 13 on Ubuntu 20.04