postgres

How to move a database to a new tablespace in postgres

This article explains how to move a database to a new tablespace in postgres. This is same as changing the default tablespace for a postgres database.   For this activity we have make sure that no a...

Trigger file validation failed. Could not start agent as standby

PROBLEM: I have received below error , while starting efm agent on standby server. [root@dbhost41 edbdata]# systemctl start edb-efm-3.9 Job for edb-efm-3.9.service failed because the control process e...

How to change postgres data directory

Below article explains how to change postgres data directory to a new location existing data_directory – > /var/lib/edb/as11/data New data_directory -> /oradata/pgdata postgres os user &#8...

How to setup streaming replication in postgres 11

In this article, we will explain how to configure streaming replication in postgres (11)from existing primary database to a new standby database( slave). If your postgres version is 12 or higher , the...

How to change port number in postgres

This article explains how to change the port number in postgres. We will change the port from 5444 to 5432 . 1. Check the existing port details postgres=# select * from pg_settings where name='port'; ...

psql: error: could not connect to server: FATAL: no pg_hba.conf entry for host

PROBLEM: While connecting to a remote database with psql got below error. -bash-4.2$hostname -i 192.168.2.3 -bash-4.2$ psql –host 192.268.8.0 -p 5444 -d postgres psql: error: could not connect t...

How to clone a postgres database to remote server

In the below tutorial , we will explain how to clone a  POSTGRES database to remote server. source postgres details: host      -> dbaclass-local db_name   -> dbatest — > This data...

How to create a database in postgres

Creating a database in postgres is very easy and it takes just few seconds. create database command is used to create the database.In this tutorial we will show different option with create database c...

How to access csv files on file system using file_fdw in postgres

File_fdw is an extension which can be used to access flat files like csv in the server’s file system. Lets see the below DEMO: 1. Check whether file_fdw extension is available on server or not: ...

How to enable and disable archive mode in postgres

Below are the steps for enabling archive mode or wal archiving in postgres. STEPS TO ENABLE ARCHIVE MODE IN POSTGRES: 1. Check archive setting in the postgres config file: postgres=# select name,setti...