Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc6c302

Browse files
committed
Fix: primary_slot_name never actually was set
1 parent3e5dbec commitbc6c302

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎testgres/backup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def spawn_replica(self, name=None, destroy=True, slot_name=None):
171171

172172
# Assign it a master and a recovery file (private magic)
173173
node._assign_master(self.original_node)
174-
node._create_recovery_conf(username=self.username)
174+
node._create_recovery_conf(username=self.username,slot_name=slot_name)
175175

176176
returnnode
177177

‎testgres/node.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def _create_recovery_conf(self, username, slot_name=None):
209209
).format(conninfo)
210210

211211
ifslot_name:
212-
line+="primary_slot_name={}\n".format()
212+
line+="primary_slot_name={}\n".format(slot_name)
213213

214214
self.append_conf(RECOVERY_CONF_FILE,line)
215215

@@ -872,7 +872,9 @@ def create_replication_slot(self, slot_name, dbname=None, username=None):
872872
dbname: database name
873873
username: database user name
874874
"""
875-
query="select pg_create_physical_replication_slot('{}')".format(slot_name)
875+
query= (
876+
"select pg_create_physical_replication_slot('{}')"
877+
).format(slot_name)
876878

877879
self.execute(query=query,
878880
dbname=dbnameordefault_dbname(),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp