Skip to content

Commit

Permalink
Correct typos in documentation and tests (#856)
Browse files Browse the repository at this point in the history
* Correct typos in documentation and tests
* Change 'formated' to 'formatted'
  • Loading branch information
eradman committed Dec 15, 2021
1 parent f174e9e commit 676bb45
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ The main changes of this release are:
- It is possible to `pg_autoctl create postgres` when PGDATA is an already
existing data_directory: as usual the monitor decides if that node is
going to be a primary or a standby. All the Postgres nodes in the same
group must have the same Postgres system identifer, and that is now
group must have the same Postgres system identifier, and that is now
enforced on the monitor.

#### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ The command `pg_autoctl perform switchover` can be used to force
pg_auto_failover to orchestrate a failover. Because all the nodes are
actually running fine (meaning that `pg_autoctl` actively reports the local
state of each node to the monitor), the failover process does not have to
carefuly implement timeouts to make sure to avoid split-brain.
carefully implement timeouts to make sure to avoid split-brain.

~~~ bash
$ pg_autoctl perform switchover
Expand Down
4 changes: 2 additions & 2 deletions ci/banned.h.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ grep -E '\b(strcat|strcpy|strerror|strncat|strncpy|strtok|wcscat|wcscpy|wcsncat
# shellcheck disable=SC2086
grep -E '\b(wnsprintf|wnsprintfA|wnsprintfW|_snwprintf|_snprintf|_sntprintf|_vsnprintf|vsnprintf|_vsnwprintf|_vsntprintf|wvnsprintf|wvnsprintfA|wvnsprintfW|strtok|_tcstok|wcstok|_mbstok|makepath|_tmakepath| _makepath|_wmakepath|_splitpath|_tsplitpath|_wsplitpath|scanf|wscanf|_tscanf|sscanf|swscanf|_stscanf|snscanf|snwscanf|_sntscanf|_itoa|_itow|_i64toa|_i64tow|_ui64toa|_ui64tot|_ui64tow|_ultoa|_ultot|_ultow|CharToOem|CharToOemA|CharToOemW|OemToChar|OemToCharA|OemToCharW|CharToOemBuffA|CharToOemBuffW|alloca|_alloca|ChangeWindowMessageFilter)\(' $files \
| grep -v "IGNORE-BANNED" \
&& echo "ERROR: Recomended banned API usage detected" && exit 1
&& echo "ERROR: Recommended banned API usage detected" && exit 1

# Recommended banned from table on liquid. If you can change the code not to use these
# that would be great. You can use IGNORE-BANNED if you need to use it anyway.
Expand All @@ -50,5 +50,5 @@ grep -E '\b(wnsprintf|wnsprintfA|wnsprintfW|_snwprintf|_snprintf|_sntprintf|_vsn
# shellcheck disable=SC2086
grep -E '\b(alloca|getwd|mktemp|tmpnam|wcrtomb|wcrtombs|wcslen|wcsrtombs|wcstombs|wctomb|class_addMethod|class_replaceMethod)\(' $files \
| grep -v "IGNORE-BANNED" \
&& echo "ERROR: Recomended banned API usage detected" && exit 1
&& echo "ERROR: Recommended banned API usage detected" && exit 1
exit 0
2 changes: 1 addition & 1 deletion docs/how-to.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ or development purposes.
When running several ``pg_autoctl`` nodes on the same machine for testing
or contributing to pg_auto_failover, each Postgres instance needs to run
on its own port, and with its own data directory. It can make things
easier to then set the environement variables ``PGDATA`` and ``PGPORT``
easier to then set the environment variables ``PGDATA`` and ``PGPORT``
in each terminal, shell, or tab where each instance is started.

Inspecting nodes
Expand Down
2 changes: 1 addition & 1 deletion docs/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ the following commands.

1. Apply the STONITH approach on the old monitor to make sure this node is
not going to show up again during the procedure. This step is sometimes
refered to as “fencing”.
referred to as “fencing”.

2. On every node, ending with the (current) Postgres primary node for each
group, disable the monitor while ``pg_autoctl`` is still running::
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_config_check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions docs/ref/pg_autoctl_config_get.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

Description
-----------
Expand Down Expand Up @@ -83,7 +83,7 @@ Without arguments, we get the entire file::
postgresql_restart_failure_timeout = 20
postgresql_restart_failure_max_retries = 3

It is possible to pipe JSON formated output to the ``jq`` command line and
It is possible to pipe JSON formatted output to the ``jq`` command line and
filter the result down to a specific section of the file::

$ pg_autoctl config get --pgdata node1 --json | jq .pg_autoctl
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_config_set.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

Description
-----------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_create_postgres.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ corresponding to as many implementation strategies.
The monitor answers to the registration call with a state to assign to
the new member of the group, either *SINGLE* or *WAIT_STANDBY*. When
the assigned state is *SINGLE*, then ``pg_autoctl create postgres``
proceedes to initialize a new PostgreSQL instance.
proceeds to initialize a new PostgreSQL instance.

2. Initialize an already existing primary server

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_get_formation_number_sync_standbys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_get_formation_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_get_node_candidate_priority.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
4 changes: 2 additions & 2 deletions docs/ref/pg_autoctl_get_node_replication_quorum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pg_autoctl get replication-quorum - get replication-quorum property from the mon
Synopsis
--------

This command prints ``pg_autoctl`` replication quorun for a given node::
This command prints ``pg_autoctl`` replication quorum for a given node::

usage: pg_autoctl get node replication-quorum [ --pgdata ] [ --json ] [ --formation ] [ --name ]

Expand All @@ -35,7 +35,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_set_formation_number_sync_standbys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_set_node_candidate_priority.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_set_node_replication_quorum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

--formation

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_show_events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Options

--json

Output a JSON formated data instead of a table formatted list.
Output a JSON formatted data instead of a table formatted list.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_show_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Options

--json

Output JSON formated data.
Output JSON formatted data.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_show_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Options

--json

Output a JSON formated data instead of a table formatted list.
Output a JSON formatted data instead of a table formatted list.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_show_standby_names.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Options

--json

Output a JSON formated data instead of a table formatted list.
Output a JSON formatted data instead of a table formatted list.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_show_state.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Options

--json

Output a JSON formated data instead of a table formatted list.
Output a JSON formatted data instead of a table formatted list.

Description
-----------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_show_uri.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Options

--json

Output a JSON formated data instead of a table formatted list.
Output a JSON formatted data instead of a table formatted list.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/pg_autoctl_status.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Options

--json

Output a JSON formated data instead of a table formatted list.
Output a JSON formatted data instead of a table formatted list.

Example
-------
Expand Down
6 changes: 3 additions & 3 deletions docs/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Certificates`__ page.
__ https://www.postgresql.org/docs/current/ssl-tcp.html#SSL-CERTIFICATE-CREATION

The certificate subject CN defaults to the ``--hostname`` parameter, which
can be given explicitely or computed by ``pg_autoctl`` as either your
can be given explicitly or computed by ``pg_autoctl`` as either your
hostname when you have proper DNS resolution, or your current IP address.

Self-signed certificates provide protection against eavesdropping; this
Expand Down Expand Up @@ -179,7 +179,7 @@ it handle the Postgres setup for you::
...

The option ``--ssl-mode`` can be used to force connection strings used by
``pg_autoctl`` to contain your prefered ssl mode. It defaults to ``require``
``pg_autoctl`` to contain your preferred ssl mode. It defaults to ``require``
when using ``--ssl-self-signed`` and to ``allow`` when ``--no-ssl`` is used.
Here, we set ``--ssl-mode`` to ``verify-full`` which requires SSL
Certificates Authentication, covered next.
Expand Down Expand Up @@ -315,7 +315,7 @@ configuration with::

$ pg_autoctl config get pg_autoctl.monitor

Note that an already running pg_autoctl deamon will try to reload its
Note that an already running pg_autoctl daemon will try to reload its
configuration after ``pg_autoctl enable ssl`` has finished. In some cases
this is not possible to do without a restart. So be sure to check the logs
from a running daemon to confirm that the reload succeeded. If it did not
Expand Down
2 changes: 1 addition & 1 deletion src/bin/lib/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Vendored-in librairies
# Vendored-in libraries

## log.c

Expand Down
2 changes: 1 addition & 1 deletion tests/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def run_unmanaged(self, command, user=os.getenv("USER")):
def run_and_wait(self, command, name, timeout=COMMAND_TIMEOUT):
"""
Waits for command to exit successfully. If it exits with error or it timeouts,
raises an execption with stdout and stderr streams of the process.
raises an exception with stdout and stderr streams of the process.
"""
with self.run(command) as proc:
try:
Expand Down
6 changes: 3 additions & 3 deletions tests/pgautofailover_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def nodes(self):
"""
Returns a list of all nodes in the cluster including the monitor
NOTE: Monitor is explicitely last in this list. So this list of nodes
NOTE: Monitor is explicitly last in this list. So this list of nodes
can be stopped in order safely.
"""
nodes = self.datanodes.copy()
Expand Down Expand Up @@ -1811,7 +1811,7 @@ def failover(self, formation="default", group=0):
"""
performs manual failover for given formation and group id
"""
failover_commmand_text = (
failover_command_text = (
"select * from pgautofailover.perform_failover('%s', %s)"
% (formation, group)
)
Expand All @@ -1820,7 +1820,7 @@ def failover(self, formation="default", group=0):
"-d",
self.database,
"-c",
failover_commmand_text,
failover_command_text,
]
self.vnode.run_and_wait(failover_command, name="manual failover")

Expand Down
2 changes: 1 addition & 1 deletion tests/test_multi_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def test_010_promote_node1():
# to the rest of the code when the promotion is all over with
#
# we need to take control way before that, so just trigger the failover
# and get back to controling our test case.
# and get back to controlling our test case.
q = "select pgautofailover.perform_promotion('default', 'node_1')"
monitor.run_sql_query(q)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_multi_standbys.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_011_write_into_new_primary():
results = node2.run_sql_query("SELECT * FROM t1")
assert results == [(1,), (2,), (3,), (4,)]

# generate more WAL trafic for replication
# generate more WAL traffic for replication
node2.run_sql_query("CHECKPOINT")


Expand All @@ -233,7 +233,7 @@ def test_012_fail_primary():
print("Failing current primary node 2")
node2.fail()

# explicitely allow for the 30s timeout in stop_replication
# explicitly allow for the 30s timeout in stop_replication
assert node1.wait_until_state(target_state="stop_replication")
assert node1.wait_until_state(target_state="primary")
assert node3.wait_until_state(target_state="secondary")
Expand Down

0 comments on commit 676bb45

Please sign in to comment.