You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Specifies a trigger file whose presence should cause streaming replication to
121
-
# end (i.e., failover).
122
-
trigger_file = '/path_to/trigger'
123
-
124
-
# Specifies a command to load archive segments from the WAL archive. If
125
-
# wal_keep_segments is a high enough number to retain the WAL segments
126
-
# required for the standby server, this may not be necessary. But
127
-
# a large workload can cause segments to be recycled before the standby
128
-
# is fully synchronized, requiring you to start again from a new base backup.
129
-
restore_command = 'cp /path_to/archive/%f "%p"'
130
-
```
131
106
132
107
Start postgres in the standby server. It will start streaming replication.
133
108
@@ -158,15 +133,3 @@ postgres=# select * from pg_stat_wal_receiver;
158
133
```
159
134
160
135
161
-
### How to do failover
162
-
163
-
Create the trigger file in the standby after the primary fails.
164
-
165
-
How to stop the primary or the standby server
166
-
167
-
Shut down it as usual (pg_ctl stop).
168
-
169
-
How to restart streaming replication after failover
170
-
171
-
Repeat the operations from 6th; making a fresh backup, some configurations and starting the original primary as the standby. The primary server doesn't
0 commit comments