@@ -564,12 +564,13 @@ def get_control_data(self):
564564
565565 return out_dict
566566
567- def start (self , params = []):
567+ def start (self , params = [], wait = True ):
568568 """
569569 Start this node using pg_ctl.
570570
571571 Args:
572572 params: additional arguments for pg_ctl.
573+ wait: wait until operation completes.
573574
574575 Returns:
575576 This instance of :class:`.PostgresNode`.
@@ -579,7 +580,7 @@ def start(self, params=[]):
579580 get_bin_path ("pg_ctl" ),
580581 "-D" , self .data_dir ,
581582 "-l" , self .pg_log_file ,
582- "-w" , # wait
583+ "-w" if wait else '-W' , # --wait or --no- wait
583584 "start"
584585 ] + params # yapf: disable
585586
@@ -594,12 +595,13 @@ def start(self, params=[]):
594595
595596 return self
596597
597- def stop (self , params = []):
598+ def stop (self , params = [], wait = True ):
598599 """
599600 Stop this node using pg_ctl.
600601
601602 Args:
602603 params: additional arguments for pg_ctl.
604+ wait: wait until operation completes.
603605
604606 Returns:
605607 This instance of :class:`.PostgresNode`.
@@ -608,7 +610,7 @@ def stop(self, params=[]):
608610 _params = [
609611 get_bin_path ("pg_ctl" ),
610612 "-D" , self .data_dir ,
611- "-w" , # wait
613+ "-w" if wait else '-W' , # --wait or --no- wait
612614 "stop"
613615 ] + params # yapf: disable
614616
0 commit comments