User Tools

Site Tools


streaming_replication

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
streaming_replication [2011/12/12 17:17]
k2patel [postgresql.conf]
streaming_replication [2020/08/10 02:35] (current)
Line 30: Line 30:
 </​code>​ </​code>​
  
-pg_hba.conf +Setup access rule. 
-^^^^^^^^^^^+ 
 +<code bash | pg_hba.conf>
 #​Replication Trust #​Replication Trust
 hostssl ​   replication ​    ​all ​            <​IP>/​32 ​                trust hostssl ​   replication ​    ​all ​            <​IP>/​32 ​                trust
 +</​code>​
  
 +Postgres restart on Master
 +<code bash>
 bin/pg_ctl -p bin/​postmaster -D data -l pgstartup.log start bin/pg_ctl -p bin/​postmaster -D data -l pgstartup.log start
 bin/pg_ctl -p bin/​postmaster -D data -l pgstartup.log stop bin/pg_ctl -p bin/​postmaster -D data -l pgstartup.log stop
 +</​code>​
  
- +Sync current data over Rsync. 
-bin/psql -c "​SELECT pg_start_backup('​label',​ true)" ​\\ +<code bash> 
-rsync -av data/ <​IP>:​standby/​ --exclude postmaster.pid ​\\ +bin/psql -c "​SELECT pg_start_backup('​label',​ true)"​ 
-bin/psql -c "​SELECT pg_stop_backup()" ​\\ +rsync -av data/ <​IP>:​standby/​ --exclude postmaster.pid 
 +bin/psql -c "​SELECT pg_stop_backup()"​ 
 +</​code>​
  
 ==== Recovery.conf ==== ==== Recovery.conf ====
streaming_replication.1323710244.txt.gz · Last modified: 2020/08/10 02:29 (external edit)