Posts Tagged postgresql 9.0.4

Postgresql 9.0.4 replication

Postgresql 9.0.4 replication
I did a simple testing on Postgresql 9.0.4 replication configuration.
This is my flow for the setup. I hope these steps can help for your reference.

Master =
Standby =

Install postgresql 9.0.4 on master and standby server

Edit postgresql.conf on master server

listen_addresses = ''

Edit pg_hba.conf on master server

# The standby server must have superuser access privileges.
host  replication  postgres  trust

Edit postgresql.conf on master server

wal_level = hot_standby
max_wal_senders = 5
wal_keep_segments = 32

Stop postgresql on master server

tar data folder to a tar file (e.g. data.tgz)

on standby server
Stop postgresql

rename data folder
mv data data_org
untar data.tgz

Edit postgresql.conf on standby server

wal_level = minimal
max_wal_senders = 0
wal_keep_segments = 0
hot_standby = on

create and edit recovery.conf on standby server.

standby_mode          = 'on'
primary_conninfo      = 'host= port=5432 user=postgres'

Start postgresql on Master Server
Start postgresql on Standby Server

Grep the following information to verify that replication is running.
On Master:
ps -ef | grep sender

On Standby
ps -ef | grep receiver

You can use createdb to create database on master server. Then, this DB will be replicated to standby server.
You can use “psql -l” to list database on server.

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.18_1163]
Rating: 0 (from 0 votes)
Total views: 14,202 views

, , ,

No Comments