Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f64dd60

Browse files
PostgresNode_Base is updated (documentation)
1 parent bf28a1a commit f64dd60

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

testgres/node_base.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ class PostgresNode_Base(object):
129129

130130
def __init__(self, os_ops: OsOperations, name=None, port=None, bin_dir=None, prefix=None):
131131
"""
132-
PostgresNode constructor.
132+
PostgresNode_Base constructor.
133133
134134
Args:
135+
os_ops: OS operations object.
135136
name: node's application name.
136137
port: port to accept connections.
137138
bin_dir: path to node's binary directory.
@@ -648,7 +649,7 @@ def init(self, initdb_params=None, cached=True, **kwargs):
648649
allow_streaming: should this node add a hba entry for replication?
649650
650651
Returns:
651-
This instance of :class:`.PostgresNode`
652+
This instance of :class:`.PostgresNode_Base`
652653
"""
653654

654655
# initialize this PostgreSQL node
@@ -682,7 +683,7 @@ def default_conf(self,
682683
log_statement: one of ('all', 'off', 'mod', 'ddl').
683684
684685
Returns:
685-
This instance of :class:`.PostgresNode`.
686+
This instance of :class:`.PostgresNode_Base`.
686687
"""
687688

688689
postgres_conf = os.path.join(self.data_dir, PG_CONF_FILE)
@@ -779,7 +780,7 @@ def append_conf(self, line='', filename=PG_CONF_FILE, **kwargs):
779780
**kwargs: named config options.
780781
781782
Returns:
782-
This instance of :class:`.PostgresNode`.
783+
This instance of :class:`.PostgresNode_Base`.
783784
784785
Examples:
785786
>>> append_conf(fsync=False)
@@ -916,7 +917,7 @@ def start(self, params=[], wait=True):
916917
wait: wait until operation completes.
917918
918919
Returns:
919-
This instance of :class:`.PostgresNode`.
920+
This instance of :class:`.PostgresNode_Base`.
920921
"""
921922

922923
assert __class__._C_MAX_START_ATEMPTS > 1
@@ -1009,7 +1010,7 @@ def stop(self, params=[], wait=True):
10091010
wait: If True, waits until the operation is complete. Defaults to True.
10101011
10111012
Returns:
1012-
This instance of :class:`.PostgresNode`.
1013+
This instance of :class:`.PostgresNode_Base`.
10131014
"""
10141015
if not self.is_started:
10151016
return self
@@ -1051,7 +1052,7 @@ def restart(self, params=[]):
10511052
params: additional arguments for pg_ctl.
10521053
10531054
Returns:
1054-
This instance of :class:`.PostgresNode`.
1055+
This instance of :class:`.PostgresNode_Base`.
10551056
"""
10561057

10571058
_params = [
@@ -1083,7 +1084,7 @@ def reload(self, params=[]):
10831084
params: additional arguments for pg_ctl.
10841085
10851086
Returns:
1086-
This instance of :class:`.PostgresNode`.
1087+
This instance of :class:`.PostgresNode_Base`.
10871088
"""
10881089

10891090
_params = [
@@ -1104,7 +1105,7 @@ def promote(self, dbname=None, username=None):
11041105
needed.
11051106
11061107
Returns:
1107-
This instance of :class:`.PostgresNode`.
1108+
This instance of :class:`.PostgresNode_Base`.
11081109
"""
11091110

11101111
_params = [
@@ -1173,7 +1174,7 @@ def cleanup(self, max_attempts=3, full=False):
11731174
full: clean full base dir
11741175
11751176
Returns:
1176-
This instance of :class:`.PostgresNode`.
1177+
This instance of :class:`.PostgresNode_Base`.
11771178
"""
11781179

11791180
self._try_shutdown(max_attempts)
@@ -1534,13 +1535,13 @@ def set_synchronous_standbys(self, standbys):
15341535
"""
15351536
Set standby synchronization options. This corresponds to
15361537
`synchronous_standby_names <https://www.postgresql.org/docs/current/static/runtime-config-replication.html#GUC-SYNCHRONOUS-STANDBY-NAMES>`_
1537-
option. Note that :meth:`~.PostgresNode.reload` or
1538-
:meth:`~.PostgresNode.restart` is needed for changes to take place.
1538+
option. Note that :meth:`~.PostgresNode_Base.reload` or
1539+
:meth:`~.PostgresNode_Base.restart` is needed for changes to take place.
15391540
15401541
Args:
15411542
standbys: either :class:`.First` or :class:`.Any` object specifying
15421543
synchronization parameters or just a plain list of
1543-
:class:`.PostgresNode`s replicas which would be equivalent
1544+
:class:`.PostgresNode_Base`s replicas which would be equivalent
15441545
to passing ``First(1, <list>)``. For PostgreSQL 9.5 and below
15451546
it is only possible to specify a plain list of standbys as
15461547
`FIRST` and `ANY` keywords aren't supported.
@@ -1700,7 +1701,7 @@ def pgbench_init(self, **kwargs):
17001701
Sets initialize=True.
17011702
17021703
Returns:
1703-
This instance of :class:`.PostgresNode`.
1704+
This instance of :class:`.PostgresNode_Base`.
17041705
"""
17051706

17061707
self.pgbench_run(initialize=True, **kwargs)
@@ -1915,7 +1916,7 @@ def upgrade_from(self, old_node, options=None, expect_error=False):
19151916
Upgrade this node from an old node using pg_upgrade.
19161917
19171918
Args:
1918-
old_node: An instance of PostgresNode representing the old node.
1919+
old_node: A result of command operation.
19191920
"""
19201921
if not os.path.exists(old_node.data_dir):
19211922
raise Exception("Old node must be initialized")

0 commit comments

Comments
 (0)