@@ -912,13 +912,14 @@ def free_port(self):
912912 self ._should_free_port = False
913913 release_port (self .port )
914914
915- def cleanup (self , max_attempts = 3 ):
915+ def cleanup (self , max_attempts = 3 , full = False ):
916916 """
917917 Stop node if needed and remove its data/logs directory.
918918 NOTE: take a look at TestgresConfig.node_cleanup_full.
919919
920920 Args:
921921 max_attempts: how many times should we try to stop()?
922+ full: clean full base dir
922923
923924 Returns:
924925 This instance of :class:`.PostgresNode`.
@@ -927,7 +928,7 @@ def cleanup(self, max_attempts=3):
927928 self ._try_shutdown (max_attempts )
928929
929930 # choose directory to be removed
930- if testgres_config .node_cleanup_full :
931+ if testgres_config .node_cleanup_full or full :
931932 rm_dir = self .base_dir # everything
932933 else :
933934 rm_dir = self .data_dir # just data, save logs
@@ -1655,8 +1656,7 @@ def upgrade_from(self, old_node, options=None, expect_error=False):
16551656 "--old-datadir" , old_node .data_dir ,
16561657 "--new-datadir" , self .data_dir ,
16571658 "--old-port" , str (old_node .port ),
1658- "--new-port" , str (self .port ),
1659- "--copy"
1659+ "--new-port" , str (self .port )
16601660 ]
16611661 upgrade_command += options
16621662
0 commit comments