Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Replication slots #41
Conversation
Codecov Report
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 97.02% 97.27% +0.24%
==========================================
Files 16 16
Lines 1245 1356 +111
==========================================
+ Hits 1208 1319 +111
Misses 37 37
Continue to review full report at Codecov.
|
).format(slot_name) | ||
|
||
self.execute(query=query, | ||
dbname=dbname or default_dbname(), |
funbringer
Mar 14, 2018
Collaborator
You don't have to explicitly use default_dbname()
and such since execute()
method is able to handle None
args properly.
You don't have to explicitly use default_dbname()
and such since execute()
method is able to handle None
args properly.
zilder
Mar 20, 2018
Author
Collaborator
Agree
Agree
u"log_statement = {}\n" | ||
u"listen_addresses = '{}'\n" | ||
u"port = {}\n" | ||
u"max_replication_slots = {}\n".format(log_statement, |
funbringer
Mar 14, 2018
Collaborator
IMHO max_replication_slots
should be placed under allow_streaming=True
, next to max_wal_senders
etc.
IMHO max_replication_slots
should be placed under allow_streaming=True
, next to max_wal_senders
etc.
zilder
Mar 20, 2018
Author
Collaborator
Agree as well
Agree as well
@@ -856,7 +863,24 @@ def backup(self, **kwargs): | |||
|
|||
return NodeBackup(node=self, **kwargs) | |||
|
|||
def replicate(self, name=None, **kwargs): | |||
def create_replication_slot(self, slot_name, dbname=None, username=None): |
funbringer
Mar 14, 2018
Collaborator
Should we allow user to choose his own slot_name
? If not, it's better to inline this method.
Should we allow user to choose his own slot_name
? If not, it's better to inline this method.
zilder
Mar 20, 2018
•
Author
Collaborator
If we don't allow this, then it could contradict with logical replication interface (#42) which allows user to choose the subscriber name (which implicitly creates logical replication slot with the same name) voluntarily.
Speaking of inlining, I can call create_replication_slot()
from replicate()
if slot_name != None
so that user won't need to call it explicitly. It would be more convenient for user.
If we don't allow this, then it could contradict with logical replication interface (#42) which allows user to choose the subscriber name (which implicitly creates logical replication slot with the same name) voluntarily.
Speaking of inlining, I can call create_replication_slot()
from replicate()
if slot_name != None
so that user won't need to call it explicitly. It would be more convenient for user.
funbringer
Mar 20, 2018
•
Collaborator
@zilder You're right, of course. Maybe we'll add a default name generator later.
Speaking of inlining, I can call create_replication_slot() from replicate() if slot_name != None
Sure, that would be nice. It's better to check if slot exists, though.
@zilder You're right, of course. Maybe we'll add a default name generator later.
Speaking of inlining, I can call create_replication_slot() from replicate() if slot_name != None
Sure, that would be nice. It's better to check if slot exists, though.
zilder
Mar 20, 2018
Author
Collaborator
It's better to check if slot exists, though.
True
It's better to check if slot exists, though.
True
Please make sure that code won't be rewritten by |
b4051cf
into
postgrespro:master
No description provided.