Skip to content

Commit e375302

Browse files
Add options to pg_upgrade (#125)
1 parent 8a25cb3 commit e375302

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testgres/node.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ def set_auto_conf(self, options, config='postgresql.auto.conf', rm_options={}):
16391639

16401640
self.os_ops.write(path, auto_conf, truncate=True)
16411641

1642-
def upgrade_from(self, old_node):
1642+
def upgrade_from(self, old_node, options=None):
16431643
"""
16441644
Upgrade this node from an old node using pg_upgrade.
16451645
@@ -1652,6 +1652,9 @@ def upgrade_from(self, old_node):
16521652
if not os.path.exists(self.data_dir):
16531653
self.init()
16541654

1655+
if not options:
1656+
options = []
1657+
16551658
pg_upgrade_binary = self._get_bin_path("pg_upgrade")
16561659

16571660
if not os.path.exists(pg_upgrade_binary):
@@ -1666,6 +1669,7 @@ def upgrade_from(self, old_node):
16661669
"--old-port", str(old_node.port),
16671670
"--new-port", str(self.port),
16681671
]
1672+
upgrade_command += options
16691673

16701674
return self.os_ops.exec_command(upgrade_command)
16711675

0 commit comments

Comments
 (0)