streaming_replication
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| streaming_replication [2011/07/25 16:31] – k2patel | streaming_replication [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| ==== postgresql.conf ==== | ==== postgresql.conf ==== | ||
| - | < | + | < |
| listen_addresses = ' | listen_addresses = ' | ||
| port = 5435 #### Only Define if you running on non default port. | port = 5435 #### Only Define if you running on non default port. | ||
| Line 18: | Line 18: | ||
| wal_level = hot_standby | wal_level = hot_standby | ||
| archive_mode = on | archive_mode = on | ||
| - | archive_command = 'cp %p /usr/local/postgres/data/pg_xlogarch/%f' | + | archive_command = 'rsync -a /usr/local/pg-9.0.3/Archive/%p < |
| max_wal_senders = 5 ####( this setting for 1 slave can connect with Master) | max_wal_senders = 5 ####( this setting for 1 slave can connect with Master) | ||
| wal_keep_segments = 32 | wal_keep_segments = 32 | ||
| Line 30: | Line 30: | ||
| </ | </ | ||
| - | pg_hba.conf | + | Setup access rule. |
| - | ^^^^^^^^^^^ | + | |
| + | <code bash | pg_hba.conf> | ||
| # | # | ||
| hostssl | hostssl | ||
| + | </ | ||
| + | Postgres restart on Master | ||
| + | <code bash> | ||
| bin/pg_ctl -p bin/ | bin/pg_ctl -p bin/ | ||
| bin/pg_ctl -p bin/ | bin/pg_ctl -p bin/ | ||
| + | </ | ||
| + | Sync current data over Rsync. | ||
| + | <code bash> | ||
| bin/psql -c " | bin/psql -c " | ||
| rsync -av data/ < | rsync -av data/ < | ||
| bin/psql -c " | bin/psql -c " | ||
| + | </ | ||
| ==== Recovery.conf ==== | ==== Recovery.conf ==== | ||
| < | < | ||
| standby_mode = ' | standby_mode = ' | ||
| - | primary_conninfo = 'host=v4.mcfapps.com | + | primary_conninfo = 'host=< |
| # primary_conninfo = ' | # primary_conninfo = ' | ||
| # to specify a connection info to the master node. | # to specify a connection info to the master node. | ||
streaming_replication.1311611494.txt.gz · Last modified: 2020/08/10 02:29 (external edit)
