User Tools

Site Tools


streaming_replication

Differences

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

Link to this comparison view

streaming_replication [2011/07/25 15:48]
k2patel created
streaming_replication [2020/08/10 02:35]
Line 1: Line 1:
-====== Replication PGSQL ====== 
  
-==== Building PGsQL ==== 
-<code bash> 
-./configure --prefix=/​usr/​local/​pg-9.0.3 --with-openssl --with-ossp-uuid --with-perl 
-</​code>​ 
- 
-NOTE : Use **//​--with-pgport=5435//​** if you want to hardcode port. 
- 
-==== postgresql.conf ==== 
-  
-<code ini> 
-listen_addresses = '​*'​ 
-port = 5435 // Only Define if you running on non default port. 
-escape_string_warning = off 
-shared_buffers = 8192MB ​ 
-temp_buffers = 16MB 
-wal_level = hot_standby ​               ​ 
-archive_mode = on    
-archive_command = 'cp %p /​usr/​local/​postgres/​data/​pg_xlogarch/​%f'​ 
-max_wal_senders = 5    ####( this setting for  1 slave can connect with Master) ​       ​ 
-wal_keep_segments = 32          ​ 
-lc_messages = '​en_US.UTF-8' ​                   ​ 
-lc_monetary = '​en_US.UTF-8' ​                   
-lc_numeric = '​en_US.UTF-8' ​                     
-lc_time = '​en_US.UTF-8' ​                       
-default_text_search_config = '​pg_catalog.english'​ 
-ssl = on                                # (change requires restart) 
-ssl_ciphers = '​SSLv3:​+HIGH:​+MEDIUM:​!SSLv2:​!ADH:​!LOW:​!EXP:​!aNULL:​!eNULL:​@STRENGTH' ​      # allowed SSL ciphers 
-</​code>​ 
- 
-pg_hba.conf 
-^^^^^^^^^^^ 
-#​Replication Trust 
-hostssl ​   replication ​    ​all ​            <​IP>/​32 ​                trust 
- 
-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/psql -c "​SELECT pg_start_backup('​label',​ true)" 
-rsync -av data/ <​IP>:​standby/​ --exclude postmaster.pid 
-bin/psql -c "​SELECT pg_stop_backup()"​ 
- 
- 
-http://​ketan.lithiumfox.com/​doku.php?​id=postgresql_replication_monitor 
streaming_replication.txt ยท Last modified: 2020/08/10 02:35 (external edit)