FATAL no pg_hba.conf entry for replication connection from host

In this article, we find the solution for Fatal error.

FATAL: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off

FATAL no pg_hba.conf entry for replication connection from host

Reason: The database name has to be replication as all does not cover replication connections.
Add below lines in pg_hba.conf file.

host replication postgres 127.0.0.1/0 trust local replication postgres peer

Dont forgot to reload. Run either of below commands to reload.

pt_ctl reload() systemctl reload postgresql

How to enable archive mode in PostgreSQL

In this article, we will see how to enable archive mode in PostgreSQL. Archive mode is not enabled by default in PostgreSQL.

What is archiving

Archiving is the concept to store history in a safe location. This also helps with Point In Time Recovery(PITR) and also in situations where a standby is lagging behind the primary and requires the recently removed WAL segments to get back to sync.

Steps to enable archive mode in PostgreSQL:
Continue reading How to enable archive mode in PostgreSQL

How to setup streaming replication in PostgreSQL step by step on Ubuntu

In this article, we will see how to setup streaming replication in PostgreSQL step by step on Ubuntu.

There is no recovery.conf file in standby anymore and that the replication setup (streaming replication) as slightly changed in PostgreSQL 12.
Continue reading How to setup streaming replication in PostgreSQL step by step on Ubuntu

cannot delete from view pg_replication_slots

In this article, we will see solution for the error “cannot delete from view pg_replication_slots”.

ERROR: cannot delete from view "pg_replication_slots" DETAIL: Views that do not select from a single table or view are not automatically updatable. HINT: To enable deleting from the view, provide an INSTEAD OF DELETE trigger or an unconditional ON DELETE DO INSTEAD rule.

cannot delete from view pg_replication_slots

Continue reading cannot delete from view pg_replication_slots