Skip to content

Commit 32654f8

Browse files
Merge pull request #11 from egarbuz/pglz_for_pg_probackup3
Add check version: skipping addition -j 1 with pglz for pg_probackup3
2 parents 3cf6207 + 3bae3a2 commit 32654f8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

pg_probackup2/app.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,12 @@ def _add_options(self, command: list, skip_log_directory: bool):
159159
command += ['--log-directory=' + self.pb_log_path]
160160
strcommand += ' ' + command[-1]
161161

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'
167168

168169
return command, strcommand
169170

0 commit comments

Comments
 (0)