@@ -501,8 +501,9 @@ def get_auth_method(t):
501501
502502 if allow_logical :
503503 if not pg_version_ge ('10' ):
504- raise InitNodeException ("Logical replication is only "
505- "available for Postgres 10 and newer" )
504+ raise InitNodeException (
505+ "Logical replication is only available for Postgres 10 "
506+ "and newer" )
506507 conf .write (u"wal_level = logical\n " )
507508
508509 # disable UNIX sockets if asked to
@@ -1022,11 +1023,7 @@ def catchup(self, dbname=None, username=None):
10221023 except Exception as e :
10231024 raise_from (CatchUpException ("Failed to catch up" , poll_lsn ), e )
10241025
1025- def publish (self ,
1026- name ,
1027- tables = None ,
1028- dbname = None ,
1029- username = None ):
1026+ def publish (self , name , ** kwargs ):
10301027 """
10311028 Create publication for logical replication
10321029
@@ -1036,25 +1033,26 @@ def publish(self,
10361033 dbname: database name where objects or interest are located
10371034 username: replication username
10381035 """
1039- return Publication (name = name , node = self , tables = tables , dbname = dbname ,
1040- username = username )
1036+ return Publication (name = name , node = self , ** kwargs )
10411037
1042- def subscribe (self ,
1043- publication ,
1044- name ,
1045- dbname = None ,
1046- username = None ,
1047- ** kwargs ):
1038+ def subscribe (self , publication , name , dbname = None , username = None ,
1039+ ** params ):
10481040 """
10491041 Create subscription for logical replication
10501042
10511043 Args:
1052- subname : subscription name
1044+ name : subscription name
10531045 publication: publication object obtained from publish()
1054-
1046+ dbname: database name
1047+ username: replication username
1048+ params: subscription parameters (see documentation on `CREATE SUBSCRIPTION
1049+ <https://www.postgresql.org/docs/current/static/sql-createsubscription.html>`_
1050+ for details)
10551051 """
1052+ # yapf: disable
10561053 return Subscription (name = name , node = self , publication = publication ,
1057- dbname = dbname , username = username , ** kwargs )
1054+ dbname = dbname , username = username , ** params )
1055+ # yapf: enable
10581056
10591057 def pgbench (self ,
10601058 dbname = None ,
0 commit comments