Update comment and README.md file

This commit is contained in:
Benjamin Renard 2020-11-04 19:19:22 +01:00
parent 0443f56b1d
commit d33476ce8d
2 changed files with 26 additions and 21 deletions

View file

@ -29,32 +29,37 @@ This script :
Requirements
------------
* **On master node :** Slaves must be able to connect with user from `recovery.conf` to database with the same name (or another specify with `-D`) as trust (or via md5 using password specify in `~/.pgpass`).
* Some CLI tools: `sudo`, `awk`, `sed`, `bc`, `psql` and `pg_lscluster`
* **On standby node :** `PG_USER` must be able to connect localy on the database with the same name (or another specify with `-D`) as trust (or via md5 using password specify in `~/.pgpass`).
* **On master node:** Slaves must be able to connect with user from `recovery.conf` (or user specify using `-U`) to database with the same name (or another specified with `-D`) as `trust` (or via `md5` using password specified in `~/.pgpass`). This user must have `SUPERUSER` privilege (need to get replication details).
* `sudo` must be install on each nodes.
* **On standby node:** `PG_USER` must be able to connect localy on the database with the same name `(or another specified with -D)` as `trust` (or via `md5` using password specified in `~/.pgpass`).
Usage
-----
Usage : check_pg_streaming_replication [-d] [-h] [options]
-u pg_user Specify Postgres user (Default : postgres)
-b psql_bin Specify psql binary path (Default : /usr/bin/psql)
-m pg_main Specify Postgres main directory path
(By default, try to auto-detect it, on your system it :
/var/lib/postgresql/9.6/main)
```
Usage: check_pg_streaming_replication [-d] [-h] [options]
-u pg_user Specify local Postgres user (Default: try to auto-detect or use postgres)
-b psql_bin Specify psql binary path (Default: /usr/bin/psql)
-B pg_lsclusters_bin Specify pg_lsclusters binary path (Default: /usr/bin/pg_lsclusters)
-V pg_version Specify Postgres version (Default: try to auto-detect or use 9.1)
-m pg_main Specify Postgres main directory path (Default: try to auto-detect or use
/var/lib/postgresql//main)
-r recovery_conf Specify Postgres recovery configuration file path
(Default : [PG_MAIN]/recovery.conf)
-U pg_master_user Specify Postgres user to use on master (Default : user from recovery.conf file)
-p pg_port Specify default Postgres master TCP port (Default : 5432)
-D dbname Specify DB name on Postgres master/slave to connect on (Default : PG_USER)
-C 1/0 Enable or disable check if the current XLOG file of the master host is the same
of the last replay XLOG file (Default : 1)
-w replay_warn_delay Specify the replay warning delay in second (Default : 3)
-c replay_crit_delay Specify the replay critical delay in second (Default : 5)
(Default: [PG_MAIN]/recovery.conf)
-U pg_master_user Specify Postgres user to use on master (Default: user from recovery.conf file)
-p pg_port Specify default Postgres master TCP port (Default: same as local PostgreSQL
port if detected or use 5432)
-D dbname Specify DB name on Postgres master/slave to connect on (Default: PG_USER, must
match with .pgpass one is used)
-C 1/0 Enable or disable check if the current LSN of the master host is the same
of the last received LSN (Default: 1)
-w replay_warn_delay Specify the replay warning delay in second (Default: 3)
-c replay_crit_delay Specify the replay critical delay in second (Default: 5)
-d Debug mode
-h Show this message
```
Copyright
---------

View file

@ -6,7 +6,7 @@
#
# Requirements:
#
# Some CLI tools: awk, sed, bc, psql and pg_lscluster
# Some CLI tools: sudo, awk, sed, bc, psql and pg_lscluster
#
# On master node: Slaves must be able to connect with user from recovery.conf
# (or user specify using -U) to database with the same name