|
140 | 140 | 'pg_createsubscriber', '--verbose',
|
141 | 141 | '--dry-run', '--pgdata',
|
142 | 142 | $node_t->data_dir, '--publisher-server',
|
143 |
| - $node_p->connstr('pg1'), |
144 |
| - '--socket-directory', $node_t->host, |
145 |
| - '--subscriber-port', $node_t->port, |
146 |
| - '--database', 'pg1', |
147 |
| - '--database', 'pg2' |
| 143 | + $node_p->connstr('pg1'), '--socket-directory', |
| 144 | + $node_t->host, '--subscriber-port', |
| 145 | + $node_t->port, '--database', |
| 146 | + 'pg1', '--database', |
| 147 | + 'pg2' |
148 | 148 | ],
|
149 | 149 | 'target server is not in recovery');
|
150 | 150 |
|
|
154 | 154 | 'pg_createsubscriber', '--verbose',
|
155 | 155 | '--dry-run', '--pgdata',
|
156 | 156 | $node_s->data_dir, '--publisher-server',
|
157 |
| - $node_p->connstr('pg1'), |
158 |
| - '--socket-directory', $node_s->host, |
159 |
| - '--subscriber-port', $node_s->port, |
160 |
| - '--database', 'pg1', |
161 |
| - '--database', 'pg2' |
| 157 | + $node_p->connstr('pg1'), '--socket-directory', |
| 158 | + $node_s->host, '--subscriber-port', |
| 159 | + $node_s->port, '--database', |
| 160 | + 'pg1', '--database', |
| 161 | + 'pg2' |
162 | 162 | ],
|
163 | 163 | 'standby is up and running');
|
164 | 164 |
|
|
188 | 188 | 'pg_createsubscriber', '--verbose',
|
189 | 189 | '--dry-run', '--pgdata',
|
190 | 190 | $node_c->data_dir, '--publisher-server',
|
191 |
| - $node_s->connstr('pg1'), |
192 |
| - '--socket-directory', $node_c->host, |
193 |
| - '--subscriber-port', $node_c->port, |
194 |
| - '--database', 'pg1', |
195 |
| - '--database', 'pg2' |
| 191 | + $node_s->connstr('pg1'), '--socket-directory', |
| 192 | + $node_c->host, '--subscriber-port', |
| 193 | + $node_c->port, '--database', |
| 194 | + 'pg1', '--database', |
| 195 | + 'pg2' |
196 | 196 | ],
|
197 | 197 | 'primary server is in recovery');
|
198 | 198 |
|
|
201 | 201 | $node_p->wait_for_replay_catchup($node_s);
|
202 | 202 |
|
203 | 203 | # Check some unmet conditions on node P
|
204 |
| -$node_p->append_conf('postgresql.conf', q{ |
| 204 | +$node_p->append_conf( |
| 205 | + 'postgresql.conf', q{ |
205 | 206 | wal_level = replica
|
206 | 207 | max_replication_slots = 1
|
207 | 208 | max_wal_senders = 1
|
|
214 | 215 | 'pg_createsubscriber', '--verbose',
|
215 | 216 | '--dry-run', '--pgdata',
|
216 | 217 | $node_s->data_dir, '--publisher-server',
|
217 |
| - $node_p->connstr('pg1'), |
218 |
| - '--socket-directory', $node_s->host, |
219 |
| - '--subscriber-port', $node_s->port, |
220 |
| - '--database', 'pg1', |
221 |
| - '--database', 'pg2' |
| 218 | + $node_p->connstr('pg1'), '--socket-directory', |
| 219 | + $node_s->host, '--subscriber-port', |
| 220 | + $node_s->port, '--database', |
| 221 | + 'pg1', '--database', |
| 222 | + 'pg2' |
222 | 223 | ],
|
223 | 224 | 'primary contains unmet conditions on node P');
|
224 | 225 | # Restore default settings here but only apply it after testing standby. Some
|
225 | 226 | # standby settings should not be a lower setting than on the primary.
|
226 |
| -$node_p->append_conf('postgresql.conf', q{ |
| 227 | +$node_p->append_conf( |
| 228 | + 'postgresql.conf', q{ |
227 | 229 | wal_level = logical
|
228 | 230 | max_replication_slots = 10
|
229 | 231 | max_wal_senders = 10
|
230 | 232 | max_worker_processes = 8
|
231 | 233 | });
|
232 | 234 |
|
233 | 235 | # Check some unmet conditions on node S
|
234 |
| -$node_s->append_conf('postgresql.conf', q{ |
| 236 | +$node_s->append_conf( |
| 237 | + 'postgresql.conf', q{ |
235 | 238 | max_replication_slots = 1
|
236 | 239 | max_logical_replication_workers = 1
|
237 | 240 | max_worker_processes = 2
|
|
241 | 244 | 'pg_createsubscriber', '--verbose',
|
242 | 245 | '--dry-run', '--pgdata',
|
243 | 246 | $node_s->data_dir, '--publisher-server',
|
244 |
| - $node_p->connstr('pg1'), |
245 |
| - '--socket-directory', $node_s->host, |
246 |
| - '--subscriber-port', $node_s->port, |
247 |
| - '--database', 'pg1', |
248 |
| - '--database', 'pg2' |
| 247 | + $node_p->connstr('pg1'), '--socket-directory', |
| 248 | + $node_s->host, '--subscriber-port', |
| 249 | + $node_s->port, '--database', |
| 250 | + 'pg1', '--database', |
| 251 | + 'pg2' |
249 | 252 | ],
|
250 | 253 | 'standby contains unmet conditions on node S');
|
251 |
| -$node_s->append_conf('postgresql.conf', q{ |
| 254 | +$node_s->append_conf( |
| 255 | + 'postgresql.conf', q{ |
252 | 256 | max_replication_slots = 10
|
253 | 257 | max_logical_replication_workers = 4
|
254 | 258 | max_worker_processes = 8
|
|
262 | 266 | 'pg_createsubscriber', '--verbose',
|
263 | 267 | '--dry-run', '--pgdata',
|
264 | 268 | $node_s->data_dir, '--publisher-server',
|
265 |
| - $node_p->connstr('pg1'), |
266 |
| - '--socket-directory', $node_s->host, |
267 |
| - '--subscriber-port', $node_s->port, |
268 |
| - '--publication', 'pub1', |
269 |
| - '--publication', 'pub2', |
270 |
| - '--subscription', 'sub1', |
271 |
| - '--subscription', 'sub2', |
272 |
| - '--database', 'pg1', |
273 |
| - '--database', 'pg2' |
| 269 | + $node_p->connstr('pg1'), '--socket-directory', |
| 270 | + $node_s->host, '--subscriber-port', |
| 271 | + $node_s->port, '--publication', |
| 272 | + 'pub1', '--publication', |
| 273 | + 'pub2', '--subscription', |
| 274 | + 'sub1', '--subscription', |
| 275 | + 'sub2', '--database', |
| 276 | + 'pg1', '--database', |
| 277 | + 'pg2' |
274 | 278 | ],
|
275 | 279 | 'run pg_createsubscriber --dry-run on node S');
|
276 | 280 |
|
|
286 | 290 | 'pg_createsubscriber', '--verbose',
|
287 | 291 | '--dry-run', '--pgdata',
|
288 | 292 | $node_s->data_dir, '--publisher-server',
|
289 |
| - $node_p->connstr('pg1'), |
290 |
| - '--socket-directory', $node_s->host, |
291 |
| - '--subscriber-port', $node_s->port, |
292 |
| - '--replication-slot', 'replslot1' |
| 293 | + $node_p->connstr('pg1'), '--socket-directory', |
| 294 | + $node_s->host, '--subscriber-port', |
| 295 | + $node_s->port, '--replication-slot', |
| 296 | + 'replslot1' |
293 | 297 | ],
|
294 | 298 | 'run pg_createsubscriber without --databases');
|
295 | 299 |
|
|
299 | 303 | 'pg_createsubscriber', '--verbose',
|
300 | 304 | '--verbose', '--pgdata',
|
301 | 305 | $node_s->data_dir, '--publisher-server',
|
302 |
| - $node_p->connstr('pg1'), |
303 |
| - '--socket-directory', $node_s->host, |
304 |
| - '--subscriber-port', $node_s->port, |
305 |
| - '--publication', 'pub1', |
306 |
| - '--publication', 'Pub2', |
307 |
| - '--replication-slot', 'replslot1', |
308 |
| - '--replication-slot', 'replslot2', |
309 |
| - '--database', 'pg1', |
310 |
| - '--database', 'pg2' |
| 306 | + $node_p->connstr('pg1'), '--socket-directory', |
| 307 | + $node_s->host, '--subscriber-port', |
| 308 | + $node_s->port, '--publication', |
| 309 | + 'pub1', '--publication', |
| 310 | + 'Pub2', '--replication-slot', |
| 311 | + 'replslot1', '--replication-slot', |
| 312 | + 'replslot2', '--database', |
| 313 | + 'pg1', '--database', |
| 314 | + 'pg2' |
311 | 315 | ],
|
312 | 316 | 'run pg_createsubscriber on node S');
|
313 | 317 |
|
|
0 commit comments