How to Using Dblink With DML Operations in PostgreSQL 9

Dblinks provide to connect another databases. Also you can do DML operations with using dblink. I will use dblink to connect two PostgreSQL databases on this post. Also I will tell how to use select, update and delete with dblink. Firstly, you have to create dblink entension with related user which is using dblink. Create […]

1,508 total views, 2 views today

PostgreSQL Hot Standby (Streaming Replication) Database Installation and Failover Operations

PostgreSQL has few feature for standby technology. I generally use streaming replication. This is very easy and confident. Streaming replication use a replication user for replication operations.Streaming replication allows a standby server to stay more up-to-date than is possible with file-based log shipping. The standby connects to the primary, which streams WAL records to the […]

15,108 total views, 8 views today

PostgreSQL 10 New Features

PostgreSQL 10 has very good new features. In my opinion, mainly new features are Logical Replication, Improved Parallel Query, Scram Authentication, Declarative Partitioning. Logical Replication :  PostgreSQL has had physical replication that often called streaming replication since version 9.0, but this requires replicating the entire database, cannot tolerate writes in any form on the standby […]

2,544 total views, 6 views today

PostgreSQL Upgrade From 9.5 Version To 9.6 Version With PG_UPGRADE

pg_upgrade (formerly called pg_migrator) allows data stored in PostgreSQL data files to be upgraded to a later PostgreSQL major version without the data dump/reload typically required for major version upgrades, e.g. from 8.4.7 to the current major release of PostgreSQL. It is not required for minor version upgrades, e.g. from 9.0.1 to 9.0.4. Major PostgreSQL […]

12,279 total views, 10 views today

Create Dblink From Oracle to PostgreSQL Database

Since fetching data from PostgreSQL database to Oracle database, you can create database link between two database systems. For that you can apply below operations. Test Systems PostgreSQL DB IP : 192.168.10.10 OS : Centos 7 x64 Service : postgresql.service Oracle DB IP : 192.168.10.20 OS : OEL 6 x64 PostgreSQL Side psql# create user […]

23,880 total views, 4 views today

PostgreSQL Frequently Using Commands

List, Add, Drop Database List databases postgres=# \d Add database postgres=# createdb testdb or postgres=# create database testdb with owner facar; Drop database postgres=# dropdb testdb List, Add, Drop, Grant User and Schema List Users postgres=# select * from pg_user; Add User postgres=# create user facar with encrypted password ‘password’; or postgres=# createuser (interactive user create) […]

4,437 total views, 2 views today

ERROR: database “database_name” is being accessed by other users in PostgreSQL

Error When you execute drop database command, database get an error like ERROR: database “database_name” is being accessed by other users.> Solution 2,470 total views, 6 views today

2,470 total views, 6 views today

How to Delete psql Command Prompt History in PostgreSQL

When you use psql command prompt, system automaticly saves your prompts. If you use password when user creates operation, this situation can occur security risk. Therefore, you can delete this prompts with editing psql_history file like below. Find And Delete psql Prompts [root@pg ~]# locate .psql_history /var/lib/pgsql/.psql_history [root@pg ~]# vi /var/lib/pgsql/.psql_history 37,844 total views, 20 views today

37,844 total views, 20 views today

RAID (Redundant Array of Independent Disks)

RAID (redundant array of independent disks; originally redundant array of inexpensive disks) is a way of storing the same data in different places (thus, redundantly) on multiple hard disks. By placing data on multiple disks, I/O operations can overlap in a balanced way, improving performance. Since multiple disks increases the mean time between failures, storing […]

227,700 total views, 4 views today