testgres-pg-probackup2 0.6.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (15) hide show
  1. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/PKG-INFO +3 -1
  2. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/README.md +2 -0
  3. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/pg_probackup2/app.py +21 -5
  4. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/pg_probackup2/init_helpers.py +3 -2
  5. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/setup.py +2 -2
  6. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/testgres_pg_probackup2.egg-info/PKG-INFO +3 -1
  7. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/testgres_pg_probackup2.egg-info/requires.txt +2 -0
  8. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/pg_probackup2/__init__.py +0 -0
  9. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/pg_probackup2/gdb.py +0 -0
  10. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/pg_probackup2/storage/__init__.py +0 -0
  11. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/pg_probackup2/storage/fs_backup.py +0 -0
  12. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/setup.cfg +0 -0
  13. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/testgres_pg_probackup2.egg-info/SOURCES.txt +0 -0
  14. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/testgres_pg_probackup2.egg-info/dependency_links.txt +0 -0
  15. {testgres_pg_probackup2-0.6.0 → testgres_pg_probackup2-0.8.1}/testgres_pg_probackup2.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testgres_pg_probackup2
3
- Version: 0.6.0
3
+ Version: 0.8.1
4
4
  Summary: Plugin for testgres that manages pg_probackup2
5
5
  Home-page: https://github.com/postgrespro/testgres
6
6
  Author: Postgres Professional
@@ -9,6 +9,8 @@ License: PostgreSQL
9
9
  Keywords: pg_probackup,testing,testgres
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: testgres>=1.9.2
12
+ Requires-Dist: zstd
13
+ Requires-Dist: lz4
12
14
  Dynamic: author
13
15
  Dynamic: author-email
14
16
  Dynamic: description-content-type
@@ -1,3 +1,5 @@
1
+ [![PyPI package version](https://badge.fury.io/py/testgres-pg_probackup2.svg)](https://badge.fury.io/py/testgres-pg_probackup2)
2
+
1
3
  # testgres - pg_probackup2
2
4
 
3
5
  Control and testing utility for [pg_probackup2](https://github.com/postgrespro/pg_probackup). Python 3.5+ is supported.
@@ -159,11 +159,12 @@ class ProbackupApp:
159
159
  command += ['--log-directory=' + self.pb_log_path]
160
160
  strcommand += ' ' + command[-1]
161
161
 
162
- if 'pglz' in strcommand and \
163
- ' -j' not in strcommand and \
164
- '--thread' not in strcommand:
165
- command += ['-j', '1']
166
- strcommand += ' -j 1'
162
+ if init_params.major_version == 2:
163
+ if 'pglz' in strcommand and \
164
+ ' -j' not in strcommand and \
165
+ '--thread' not in strcommand:
166
+ command += ['-j', '1']
167
+ strcommand += ' -j 1'
167
168
 
168
169
  return command, strcommand
169
170
 
@@ -738,6 +739,21 @@ class ProbackupApp:
738
739
  ]
739
740
  return self.run(cmd_list + options, old_binary=old_binary, expect_error=expect_error)
740
741
 
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
+
741
757
  def show_config(self, instance, old_binary=False, expect_error=False, gdb=False):
742
758
  out_dict = {}
743
759
  cmd_list = [
@@ -96,8 +96,9 @@ class Init(object):
96
96
  if shutil.which(test_env["PGPROBACKUPBIN"]):
97
97
  self.probackup_path = test_env["PGPROBACKUPBIN"]
98
98
  else:
99
- if self.verbose:
100
- print('PGPROBACKUPBIN is not an executable file')
99
+ raise Exception(
100
+ 'pg_probackup binary not found at PGPROBACKUPBIN={0}'.format(
101
+ test_env["PGPROBACKUPBIN"]))
101
102
 
102
103
  if not self.probackup_path:
103
104
  probackup_path_tmp = os.path.join(
@@ -4,7 +4,7 @@ except ImportError:
4
4
  from distutils.core import setup
5
5
 
6
6
  setup(
7
- version='0.6.0',
7
+ version='0.8.1',
8
8
  name='testgres_pg_probackup2',
9
9
  packages=['pg_probackup2', 'pg_probackup2.storage'],
10
10
  description='Plugin for testgres that manages pg_probackup2',
@@ -14,5 +14,5 @@ setup(
14
14
  author='Postgres Professional',
15
15
  author_email='testgres@postgrespro.ru',
16
16
  keywords=['pg_probackup', 'testing', 'testgres'],
17
- install_requires=['testgres>=1.9.2']
17
+ install_requires=['testgres>=1.9.2', 'zstd', 'lz4']
18
18
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testgres_pg_probackup2
3
- Version: 0.6.0
3
+ Version: 0.8.1
4
4
  Summary: Plugin for testgres that manages pg_probackup2
5
5
  Home-page: https://github.com/postgrespro/testgres
6
6
  Author: Postgres Professional
@@ -9,6 +9,8 @@ License: PostgreSQL
9
9
  Keywords: pg_probackup,testing,testgres
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: testgres>=1.9.2
12
+ Requires-Dist: zstd
13
+ Requires-Dist: lz4
12
14
  Dynamic: author
13
15
  Dynamic: author-email
14
16
  Dynamic: description-content-type