table of contents
OCF_HEARTBEAT_PGSQL(7) | OCF resource agents | OCF_HEARTBEAT_PGSQL(7) |
NAME¶
ocf_heartbeat_pgsql - Manages a PostgreSQL database instance
SYNOPSIS¶
pgsql [start | stop | status | monitor | promote | demote | meta-data | validate-all]
DESCRIPTION¶
Resource script for PostgreSQL. It manages a PostgreSQL as an HA resource.
SUPPORTED PARAMETERS¶
pgctl
(optional, string, default "/usr/bin/pg_ctl")
start_opt
(optional, string, no default)
ctl_opt
(optional, string, no default)
psql
(optional, string, default "/usr/bin/psql")
pgdata
(optional, string, default "/var/lib/pgsql/data")
pgdba
(optional, string, default "postgres")
pghost
(optional, string, no default)
pgport
(optional, integer, default 5432)
monitor_user
(optional, string, no default)
monitor_password
(optional, string, no default)
monitor_sql
(optional, string, default "select now();")
config
(optional, string, default "/var/lib/pgsql/data/postgresql.conf")
pgdb
(optional, string, default "template1")
logfile
(optional, string, default "/dev/null")
socketdir
(optional, string, no default)
stop_escalate
(optional, integer, default 30)
rep_mode
"slave" means that RA only makes recovery.conf before starting to connect to primary which is running somewhere. It dosen´t need master/slave setting. It requires master_ip restore_command parameters.
(optional, string, default "none")
node_list
(optional, string, no default)
restore_command
(optional, string, no default)
archive_cleanup_command
(optional, string, no default)
recovery_end_command
(optional, string, no default)
master_ip
(optional, string, no default)
repuser
(optional, string, default "postgres")
primary_conninfo_opt
(optional, string, no default)
restart_on_promote
(optional, boolean, default false)
tmpdir
(optional, string, default "/var/lib/pgsql/tmp")
xlog_check_count
(optional, integer, no default)
crm_attr_timeout
(optional, integer, default 5)
stop_escalate_in_slave
(optional, integer, default 30)
check_wal_receiver
(optional, boolean, default false)
SUPPORTED ACTIONS¶
This resource agent supports the following actions (operations):
start
stop
status
monitor
monitor (Master role)
promote
demote
notify
meta-data
validate-all
methods
EXAMPLE¶
The following is an example configuration for a pgsql resource using the crm(8) shell:
primitive p_pgsql ocf:heartbeat:pgsql \
op monitor depth="0" timeout="30" interval="30" \
op monitor depth="0" timeout="30" interval="29" role="Master"
ms ms_pgsql p_pgsql \
meta notify="true" interleave="true"
SEE ALSO¶
AUTHOR¶
Linux-HA contributors (see the resource agent source for information about individual authors)
03/22/2017 | resource-agents 3.9.2 |