The cluster properties file v4
Each node in a Failover Manager cluster has a properties file (by default, named efm.properties
) that contains the properties of the individual node on which it resides. The Failover Manager installer creates a file template for the properties file named efm.properties.in
in the /etc/edb/efm-4.<x>
directory.
After completing the Failover Manager installation, make a working copy of the template before modifying the file contents:
After copying the template file, change the owner of the file to efm:
Note
By default, Failover Manager expects the cluster properties file to be named efm.properties
. If you name the properties file something other than efm.properties
, modify the service script or unit file to instruct Failover Manager to use a different name.
After creating the cluster properties file, add or modify configuration parameter values as required. For detailed information about each property, see Specifying cluster properties.
The property files are owned by root. The Failover Manager service script expects to find the files in the /etc/edb/efm-4.<x>
directory. If you move the property file to another location, you must create a symbolic link that specifies the new location.
Note
All user scripts referenced in the properties file are invoked as the Failover Manager user.
Specifying cluster properties
You can use the properties listed in the cluster properties file to specify connection properties and behaviors for your Failover Manager cluster. Modifications to property settings are applied when Failover Manager starts. If you modify a property value, you must restart Failover Manager to apply the changes.
Property values are case sensitive. While Postgres uses quoted strings in parameter values, Failover Manager doesn't allow quoted strings in property values. For example, while you might specify an IP address in a Postgres configuration parameter as:
listen_addresses='192.168.2.47'
With Failover Manager, don't enclose the value in quotes:
bind.address=192.168.2.54:7800
Use the properties in the efm.properties
file to specify connection, administrative, and operational details for Failover Manager.
Legends: In the following table:
A
: Required on primary or standby nodeW
: Required on witness nodeY
: Yes
Property name | A | W | Default value | Comments |
---|---|---|---|---|
db.user | Y | Y | Username for the database. | |
db.password.encrypted | Y | Y | Password encrypted using 'efm encrypt'. | |
db.port | Y | Y | This value must be same for all the agents. | |
db.database | Y | Y | Database name. | |
db.service.owner | Y | Owner of $PGDATA dir for db.database. | ||
db.service.name | Required if running the database as a service. | |||
db.bin | Y | Directory containing the pg_controldata/pg_ctl commands such as '/usr/edb/asnn/bin'. | ||
db.data.dir | Y | Same as the output of query 'show data_directory;' | ||
db.config.dir | Same as the output of query 'show config_file;'. Specify if it's not the same as db.data.dir. | |||
jdbc.sslmode | Y | Y | disable | See the note. |
user.email | This value must be same for all the agents; can be left blank if using a notification script. | |||
from.email. | efm@localhost | Leave blank to use the default efm@localhost. | ||
notification.level | Y | Y | INFO | See the list of notifications. |
notification.text.prefix | ||||
script.notification | Required if user.email property is not used; both parameters can be used together. | |||
bind.address | Y | Y | Example: <ip_address>:<port> | |
external.address | Example: <ip_address/hostname> | |||
admin.port | Y | Y | 7809 | Modify if the default port is already in use. |
is.witness | Y | Y | See description. | |
local.period | Y | 10 | ||
local.timeout | Y | 60 | ||
local.timeout.final | Y | 10 | ||
remote.timeout | Y | Y | 10 | |
node.timeout | Y | Y | 50 | This value must be same for all the agents. |
encrypt.agent.messages | Y | Y | false | This value must be same for all the agents |
enable.stop.cluster | true | This value must be same for all the agents. Available in Failover Manager 4.2 and later. | ||
stop.isolated.primary | Y | true | This value must be same for all the agents. | |
stop.failed.primary | Y | true | ||
primary.shutdown.as.failure | Y | Y | false | |
update.physical.slots.period | Y | 0 | ||
ping.server.ip | Y | Y | 8.8.8.8 | |
ping.server.command | Y | Y | /bin/ping -q -c3 -w5 | |
auto.allow.hosts | Y | Y | false | |
stable.nodes.file | Y | Y | false | |
db.reuse.connection.count | Y | 0 | ||
auto.failover | Y | Y | true | |
auto.reconfigure | Y | true | This value must be same for all the agents. | |
promotable | Y | true | ||
use.replay.tiebreaker | Y | Y | true | This value must be same for all the agents. |
standby.restart.delay | 0 | |||
application.name | Set to replace the application_name portion of the primary_conninfo entry with this property value before starting the original primary database as a standby. | |||
restore.command | Example: restore.command=scp <db_service_owner>@%h: <archive_path>/%f %p | |||
reconfigure.num.sync | Y | false | If you are on Failover Manager 4.1, see reconfigure_num_sync_max to raise num_sync. | |
reconfigure.num.sync.max | Available in Failover Manager 4.1 and later. | |||
reconfigure.sync.primary | Y | false | ||
minimum.standbys | Y | Y | 0 | This value must be same for all the nodes. |
priority.standbys | Available in Failover Manager 4.2 and later. | |||
recovery.check.period | Y | 1 | ||
restart.connection.timeout | 60 | |||
auto.resume.period | Y | 0 | ||
virtual.ip | (see virtual.ip.single) | Leave blank if you do not specify a VIP. | ||
virtual.ip.interface | Required if you specify a VIP. | |||
virtual.ip.prefix | Required if you specify a VIP. | |||
virtual.ip.single | Y | Y | Yes | This value must be same for all the nodes. |
check.vip.before.promotion | Y | Y | Yes | |
pgpool.enable | false | Available in Failover Manager 4.1 and later. | ||
pcp.user | Required if pgpool.enable is set to true. Available in Failover Manager 4.1 and later. | |||
pcp.host | Required if pgpool.enable is set to true, this value must be same for all the agents. Available in Failover Manager 4.1 and later. | |||
pcp.port | Required if pgpool.enable is set to true, this value must be same for all the agents. Available in Failover Manager 4.1 and later. | |||
pcp.pass.file | Required if pgpool.enable is set to true. Available in Failover Manager 4.1 and later. | |||
pgpool.bin | Required if pgpool.enable is set to true. Available in Failover Manager 4.1 and later. | |||
script.load.balancer.attach | Example: script.load.balancer.attach= /<path>/<attach_script> %h %t | |||
script.load.balancer.detach | Example: script.load.balancer.detach= /<path>/<detach_script> %h %t | |||
detach.on.agent.failure | true | Set to false if you want to keep a running primary database attached. Available in Failover Manager 4.2 and later. | ||
script.fence | Example: script.fence= /<path>/<script_name> %p %f | |||
script.post.promotion | Example: script.post.promotion= /<path>/<script_name> %f %p | |||
script.resumed | Example: script.resumed= /<path>/<script_name> | |||
script.db.failure | Example: script.db.failure= /<path>/<script_name> | |||
script.primary.isolated | Example: script.primary.isolated= /<path>/<script_name> | |||
script.remote.pre.promotion | Example: script.remote.pre.promotion= /<path>/<script_name> %p | |||
script.remote.post.promotion | Example: script.remote.post.promotion= /<path>/<script_name> %p | |||
script.custom.monitor | Example: script.custom.monitor= /<path>/<script_name> | |||
custom.monitor.interval | Required if a custom monitoring script is specified. | |||
custom.monitor.timeout | Required if a custom monitoring script is specified. | |||
custom.monitor.safe.mode | Required if a custom monitoring script is specified. | |||
sudo.command | Y | Y | sudo | |
sudo.user.command | Y | Y | sudo -u %u | |
lock.dir | If not specified, defaults to '/var/lock/efm-<version>' | |||
log.dir | If not specified, defaults to '/var/log/efm-<version>' | |||
syslog.host | localhost | |||
syslog.port | 514 | |||
syslog.protocol | ||||
syslog.facility | UDP | |||
file.log.enabled | Y | Y | true | |
syslog.enabled | Y | Y | false | |
jgroups.loglevel | info | |||
efm.loglevel | info | |||
jvm.options | -Xmx128m |
Cluster properties
Use the following properties to specify connection details for the Failover Manager cluster:
The db.user
specified must have enough privileges to invoke selected PostgreSQL commands on behalf of Failover Manager. For more information, see Prerequisites.
For information about encrypting the password for the database user, see Encrypting your database password.
Use the db.service.owner
property to specify the name of the operating system user that owns the cluster that is being managed by Failover Manager. This property isn't required on a dedicated witness node.
Specify the name of the database service in the db.service.name
property if you use the service
or systemctl
command when starting or stopping the service.
Use the same service control mechanism (pg_ctl
, service
, or systemctl
) each time you start or stop the database service. If you use the pg_ctl
program to control the service, specify the location of the pg_ctl
program in the db.bin
property.
Use the db.data.dir
property to specify the location where a standby.signal
or recovery.conf
file will be created. This property is required on primary and standby nodes. It isn't required on a dedicated witness node.
Use the db.config.dir
property to specify the location of database configuration files if they aren't stored in the same directory as the recovery.conf
or standby.signal
file. This is the value specified by the config_file
parameter directory of your EDB Postgres Advanced Server or PostgreSQL installation. This value is used as the location of the EDB Postgres Advanced Server data
directory when stopping, starting, or restarting the database.
For more information about database configuration files, visit the PostgreSQL website.
Use the jdbc.sslmode
property to instruct Failover Manager to use SSL connections. By default, SSL is disabled.
Note
If you set the value of jdbc.sslmode
to verify-ca
and you want to use Java trust store for certificate validation, you need to set the following value. This line can be added anywhere in the cluster properties file:
jdbc.properties=sslfactory=org.postgresql.ssl.DefaultJavaSSLFactory
For information about configuring and using SSL, see Secure TCP/IP Connections with SSL and Using SSL in the PostgreSQL documentation.
Use the user.email
property to specify an email address (or multiple email addresses) to receive notifications sent by Failover Manager.
The from.email
property specifies the value to use as the sender's address for email notifications from Failover Manager. You can:
- Leave
from.email
blank to use the default value (efm@localhost
). - Specify a custom value for the email address.
- Specify a custom email address, using the
%h
placeholder to represent the name of the node host (for example, example@%h). The placeholder is replaced with the name of the host as returned by the Linux hostname utility.
For more information about notifications, see Notifications.