postgres

Generate performance report in postgres using pg_profile

If you have worked on oracle, then you must of aware of AWR report, which is used to generate workload performance report of the database for a specific duration. But in postgres there is no inbuilt f...

How to access oracle database from postgres

This article explain From postgres, how can we  fetch oracle db data. For this we need to use foreign data wrapper and foreign table concepts. DEMO: 1.Create oracle client on postgres server:   ...

How to create database link in postgres

This article explain how can we access data from a remote postgres database using db_link. In postgres we call achieve this using foreign data wrappers. 1. Create extension dblink if not present. post...

Real DBA Interview questions -4

Below are the questions asked to a candidate in a production based company.   In ansible, what type of activites you did? What is a role in ansible? How you can print the output in ansible task? ...

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

In this article, we will explain how to configure streaming replication in postgres from existing primary database to a new standby database( slave). ENVIRONMENT DETAILS: PRIMARY SERVER= 10.20.30.40 S...

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...