@@ -912,13 +912,14 @@ def free_port(self):
912
912
self ._should_free_port = False
913
913
release_port (self .port )
914
914
915
- def cleanup (self , max_attempts = 3 ):
915
+ def cleanup (self , max_attempts = 3 , full = False ):
916
916
"""
917
917
Stop node if needed and remove its data/logs directory.
918
918
NOTE: take a look at TestgresConfig.node_cleanup_full.
919
919
920
920
Args:
921
921
max_attempts: how many times should we try to stop()?
922
+ full: clean full base dir
922
923
923
924
Returns:
924
925
This instance of :class:`.PostgresNode`.
@@ -927,7 +928,7 @@ def cleanup(self, max_attempts=3):
927
928
self ._try_shutdown (max_attempts )
928
929
929
930
# choose directory to be removed
930
- if testgres_config .node_cleanup_full :
931
+ if testgres_config .node_cleanup_full or full :
931
932
rm_dir = self .base_dir # everything
932
933
else :
933
934
rm_dir = self .data_dir # just data, save logs
@@ -1655,8 +1656,7 @@ def upgrade_from(self, old_node, options=None, expect_error=False):
1655
1656
"--old-datadir" , old_node .data_dir ,
1656
1657
"--new-datadir" , self .data_dir ,
1657
1658
"--old-port" , str (old_node .port ),
1658
- "--new-port" , str (self .port ),
1659
- "--copy"
1659
+ "--new-port" , str (self .port )
1660
1660
]
1661
1661
upgrade_command += options
1662
1662
0 commit comments