What is difference between pg_ctl and systemctl in PostgreSQL

In this article, we will see the difference between pg_ctl and systemctl in PostgreSQL.

Difference between pg_ctl and systemctl in PostgreSQL

Continue reading What is difference between pg_ctl and systemctl in PostgreSQL

How to install PostGIS in RHEL

In this article, we will see How to install PostGIS in RHEL. Continue reading How to install PostGIS in RHEL

PostgreSQL pg_dump: error: aborting because of server version mismatch

In this article, we will see reason and solution for below error:

pg_dump: error: server version: 15.2; pg_dump version: 13.10 pg_dump: error: aborting because of server version mismatch

pg_dump: server version: 12.3; pg_dump version: 9.2.24 pg_dump: aborting because of server version mismatch

Continue reading PostgreSQL pg_dump: error: aborting because of server version mismatch

How to find all columns of a table in PostgreSQL

In this article, we will see how to find all columns of a table in PostgreSQL.

A postgresql table not only contains user defined columns. It also adds column names like xmin, xmax,….

Find the all column names: Continue reading How to find all columns of a table in PostgreSQL

How to install or create pg_stat_statements extension in PostgreSQL

In this article, we will see how to install or create pg_stat_statements extension in PostgreSQL.

What is pg_stat_activity?
The pg_stat_statements module provides a means for tracking planning and execution statistics of all SQL statements executed by a server.

Install or create pg_stat_statements extension in PostgreSQL::

Continue reading How to install or create pg_stat_statements extension in PostgreSQL

How to install PostgreSQL on Linux Mint

In this article, we will see how to install PostgreSQL on Linux Mint step by step.

Install PostgreSQL on Linux Mint

Continue reading How to install PostgreSQL on Linux Mint

How to install PostgreSQL 15 on Fedora 37

In this article, we are going to see How to install PostgreSQL 15 on Fedora 37 step by step.

PostgreSQL 15 is latest version available at the time writing this article. PostgreSQL 15 adds features to simplify conflict management, including the ability to skip replaying a conflicting transaction and to automatically disable a subscription if an error is detected. This release also includes support for using two-phase commit (2PC) with logical replication.

Steps to install PostgreSQL 15 on Fedora:

1. We have to update the packages by running below command on Fedora.

sudo dnf update

2. Install the repository RPM:

sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/F-37-x86_64/pgdg-fedora-repo-latest.noarch.rpm

How to install PostgreSQL 15 on Fedora 37

3. Install PostgreSQL 15 on Fedora by running below command:

sudo dnf install -y postgresql15-server

s[r2schools@fedora ~]$ sudo dnf install -y postgresql15-server PostgreSQL common RPMs for Fedora 37 - x86_64 79 B/s | 195 B 00:02 PostgreSQL common RPMs for Fedora 37 - x86_64 417 kB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL common RPMs for Fedora 37 - x86_64 34 kB/s | 236 kB 00:06 PostgreSQL 15 for Fedora 37 - x86_64 78 B/s | 195 B 00:02 PostgreSQL 15 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL 15 for Fedora 37 - x86_64 43 kB/s | 155 kB 00:03 PostgreSQL 14 for Fedora 37 - x86_64 63 B/s | 195 B 00:03 PostgreSQL 14 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL 14 for Fedora 37 - x86_64 46 kB/s | 172 kB 00:03 PostgreSQL 13 for Fedora 37 - x86_64 94 B/s | 195 B 00:02 PostgreSQL 13 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL 13 for Fedora 37 - x86_64 40 kB/s | 176 kB 00:04 PostgreSQL 12 for Fedora 37 - x86_64 97 B/s | 195 B 00:02 PostgreSQL 12 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL 12 for Fedora 37 - x86_64 44 kB/s | 165 kB 00:03 PostgreSQL 11 for Fedora 37 - x86_64 92 B/s | 195 B 00:02 PostgreSQL 11 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL 11 for Fedora 37 - x86_64 26 kB/s | 165 kB 00:06 PostgreSQL 10 for Fedora 37 - x86_64 111 B/s | 195 B 00:01 PostgreSQL 10 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG PostgreSQL 10 for Fedora 37 - x86_64 14 kB/s | 52 kB 00:03 Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Installing: postgresql15-server x86_64 15.1-1PGDG.f37 pgdg15 6.1 M Installing dependencies: lz4 x86_64 1.9.3-5.fc37 fedora 58 k postgresql15 x86_64 15.1-1PGDG.f37 pgdg15 1.5 M postgresql15-libs x86_64 15.1-1PGDG.f37 pgdg15 295 k Transaction Summary ================================================================================ Install 4 Packages Total download size: 7.9 M Installed size: 34 M Downloading Packages: (1/4): lz4-1.9.3-5.fc37.x86_64.rpm 64 kB/s | 58 kB 00:00 (2/4): postgresql15-libs-15.1-1PGDG.f37.x86_64. 195 kB/s | 295 kB 00:01 (3/4): postgresql15-15.1-1PGDG.f37.x86_64.rpm 792 kB/s | 1.5 MB 00:01 (4/4): postgresql15-server-15.1-1PGDG.f37.x86_6 2.0 MB/s | 6.1 MB 00:02 -------------------------------------------------------------------------------- Total 1.4 MB/s | 7.9 MB 00:05 PostgreSQL 15 for Fedora 37 - x86_64 1.6 MB/s | 1.7 kB 00:00 Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68C9 E2B9 1A37 D136 FE74 D176 1F16 D2E1 442D F0F8 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : postgresql15-libs-15.1-1PGDG.f37.x86_64 1/4 Running scriptlet: postgresql15-libs-15.1-1PGDG.f37.x86_64 1/4 Installing : lz4-1.9.3-5.fc37.x86_64 2/4 Installing : postgresql15-15.1-1PGDG.f37.x86_64 3/4 Running scriptlet: postgresql15-15.1-1PGDG.f37.x86_64 3/4 Running scriptlet: postgresql15-server-15.1-1PGDG.f37.x86_64 4/4 Installing : postgresql15-server-15.1-1PGDG.f37.x86_64 4/4 Running scriptlet: postgresql15-server-15.1-1PGDG.f37.x86_64 4/4 Verifying : lz4-1.9.3-5.fc37.x86_64 1/4 Verifying : postgresql15-15.1-1PGDG.f37.x86_64 2/4 Verifying : postgresql15-libs-15.1-1PGDG.f37.x86_64 3/4 Verifying : postgresql15-server-15.1-1PGDG.f37.x86_64 4/4 Installed: lz4-1.9.3-5.fc37.x86_64 postgresql15-15.1-1PGDG.f37.x86_64 postgresql15-libs-15.1-1PGDG.f37.x86_64 postgresql15-server-15.1-1PGDG.f37.x86_64 Complete!

So, we have successfully installed PostgreSQL 15 on Fedora.

PostgreSQL 15 post installation steps

1. Initialize the database .

sudo /usr/pgsql-15/bin/postgresql-15-setup initdb

2. Enable the PostgreSQL service

sudo systemctl enable postgresql-15

3. Now, start the PostgreSQL service on Fedora.

sudo systemctl start postgresql-15

4. Lets verify PostgreSQL service started or not on Fedora:

sudo systemctl status postgresql-15

5. Now connect to PostgreSQL server by running below commands.

sudo su - postgres psql

6. Immediately change the password of postgres user.

alter user postgres with password 'admin@123';

So in this article, we have seen how to install PostgreSQL 15 on Fedora 37. Then, we have performed post installation steps.

Watch below video the same installation:

How to find the database creation date in PostgreSQL

In this article, we will see how to find the database creation date in PostgreSQL in windows and Linux.

There are two ways to check the database creation date in PostgreSQL. One is by running query against pg_database view and other is by checking PG_VERSION in base directory of specific database. Continue reading How to find the database creation date in PostgreSQL

How to find the error log location in PostgreSQL on Windows or Linux environments

In this article, we will see How to find the error log location in PostgreSQL on Windows or Linux environments.

We can get the error log location by running the command log_directory command in psql shell. Continue reading How to find the error log location in PostgreSQL on Windows or Linux environments

How to install PostgreSQL 15 and pgadmin on RHEL 9

In this article, we will show you How to install PostgreSQL 15 and pgadmin on RHEL 9.

PostgreSQL is a powerful, widely-used, open-source, multi-platform, and advanced object-relational database system known for its proven architecture, reliability, data integrity, robust feature set, and extensibility. Continue reading How to install PostgreSQL 15 and pgadmin on RHEL 9