postgresqlreplication
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| postgresqlreplication [2021/11/18 14:11] – [Check Replication Progress] z0hpvk | postgresqlreplication [2025/03/08 22:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 44: | Line 44: | ||
| pg_basebackup -D < | pg_basebackup -D < | ||
| + | -D Data Directory | ||
| -v Verbose | -v Verbose | ||
| -P Progress Reporting | -P Progress Reporting | ||
| Line 51: | Line 52: | ||
| </ | </ | ||
| - | Once the copy has completed, you will see the following message | + | Once the copy has completed, you will see the following message: \\ |
| < | < | ||
| pg_basebackup: | pg_basebackup: | ||
| Line 60: | Line 61: | ||
| < | < | ||
| hot_standby = on | hot_standby = on | ||
| + | </ | ||
| + | |||
| + | ==== Create a Replication Slot on the Primary ==== | ||
| + | < | ||
| + | SELECT * FROM pg_create_physical_replication_slot(' | ||
| </ | </ | ||
| Line 66: | Line 72: | ||
| standby_mode = on | standby_mode = on | ||
| primary_conninfo = ' | primary_conninfo = ' | ||
| + | primary_slot_name = ' | ||
| </ | </ | ||
| Line 76: | Line 83: | ||
| ==== Check Replication Progress ==== | ==== Check Replication Progress ==== | ||
| < | < | ||
| + | cd $HOME/ | ||
| ls -lrt $(ps -ef | grep postgres | grep recovering | grep -v grep | awk {' | ls -lrt $(ps -ef | grep postgres | grep recovering | grep -v grep | awk {' | ||
postgresqlreplication.1637244686.txt.gz · Last modified: (external edit)
