Skip to content

Commit 45cd22b

Browse files
authored
Add retention (#13)
* Add retention option * Up version
1 parent 7ef7ac2 commit 45cd22b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pg_probackup2/app.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,21 @@ def delete_expired(
739739
]
740740
return self.run(cmd_list + options, old_binary=old_binary, expect_error=expect_error)
741741

742+
def retention(
743+
self, instance, options=None, old_binary=False, gdb=False, expect_error=False):
744+
if init_params.major_version < 3:
745+
logging.warning("retention command is only available for pg_probackup 3")
746+
return None
747+
if options is None:
748+
options = []
749+
cmd_list = [
750+
'retention',
751+
'--instance={0}'.format(instance),
752+
]
753+
754+
return self.run(cmd_list + options, old_binary=old_binary, gdb=gdb,
755+
expect_error=expect_error)
756+
742757
def show_config(self, instance, old_binary=False, expect_error=False, gdb=False):
743758
out_dict = {}
744759
cmd_list = [

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from distutils.core import setup
55

66
setup(
7-
version='0.6.0',
7+
version='0.7.0',
88
name='testgres_pg_probackup2',
99
packages=['pg_probackup2', 'pg_probackup2.storage'],
1010
description='Plugin for testgres that manages pg_probackup2',

0 commit comments

Comments
 (0)