From: | "gurunadh(dot)venkata(at)gmail(dot)com" <gurunadh(dot)venkata(at)gmail(dot)com> |
---|---|
To: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Hot stand by streaming replication in postgresql 9.2 |
Date: | 2014-05-20 12:07:57 |
Message-ID: | 1400587677747-5804542.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi i am new to PostgreSQL and one of my colleague gave me a task to do Hot
stand by streaming replication in 9.2.
I am having some confusion how to set the "archive_command" and
restore_command parameters
master postgresql server installation was loacted at
/opt/PostgreSQL/9.2(IN Redhat Linux (6.x)
slave server installation was configured at /var/lib/postgres/
and also help me how to set the restore_command in the slave
side(recovery.conf file).
master details
IP:10.0.0.100
In postgresql.conf file:
listen_addresses = '*'
wal_level = hot_standby
max_wal_senders = 1
wal_keep_segments = 5
archive_mode = on
archive_command = ?(Dont no how to setup the parameter)
In pg_hba.conf file:
host replication repuser 10.0.0.200 trust
Slave Details:
postgresql.conf
hot_standby = on
Created recovery.conf, with the following lines:
restore_command = (Help me how to set this parameter)
standby_mode = 'on'
primary_conninfo = 'host=10.0.0.100 port= xxxx user=repuser password=rep
select pg_start_backup('base backup');
here i have to copy all the data dir to slave
rsync -av --exclude pg_xlog --exclude postgresql.conf data/*
10.0.0.200:/var/lib/postgresql/data/
select pg_stop_backup();
My Lead said when you query the below three SQL statements you have to get
same O/P then you have done every thing fine.
For Example:
In master
SELECT pg_current_xlog_location();
pg_current_xlog_location
--------------------------
0/1C000080
(1 row).
Then on the standby, you can run:
# SELECT pg_last_xlog_receive_location();
pg_last_xlog_receive_location
--------------------------
0/1C000080
(1 row)
# SELECT pg_last_xlog_replay_location();
pg_last_xlog_replay_location
--------------------------
0/1C000080
(1 row)
Sorry For my english.
Thanks in advance
venkat
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Hot-stand-by-streaming-replication-in-postgresql-9-2-tp5804542.html
Sent from the PostgreSQL - pgadmin hackers mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Dhiraj Chawla | 2014-05-20 12:28:52 | Re: Re: [BUGS] BUG #10250: pgAdmin III 1.16.1 stores unescaped plaintext password |
Previous Message | Dave Page | 2014-05-16 08:23:19 | Re: Re: [BUGS] BUG #10250: pgAdmin III 1.16.1 stores unescaped plaintext password |