diff --git a/doc/repmgrd-bdr.sgml b/doc/repmgrd-bdr.sgml index 13520d81..aa3f97a8 100644 --- a/doc/repmgrd-bdr.sgml +++ b/doc/repmgrd-bdr.sgml @@ -174,17 +174,13 @@ Key to "failover" execution is the event_notification_command, which is a user-definable script specified in repmpgr.conf - and which should reconfigure the proxy server/ connection pooler to point - to the other, still-active node. + and which can use a &repmgr; event notification + to reconfigure the proxy server / connection pooler so it points to the other, still-active node. + Details of the event will be passed as parameters to the script. - Each time &repmgr; (or repmgrd) records an event, - it can optionally execute the script defined in - event_notification_command to take further action; - details of the event will be passed as parameters. - - - Following placeholders are available to the script: + Following parameter placeholders are available for the script definition in repmpgr.conf; + these will be replaced with the appropriate value when the script is executed: @@ -231,20 +227,35 @@ + + + + + conninfo string of the next available node (bdr_failover) + + + + + + + + name of the next available node (bdr_failover) + + + - Note that %c and %a will only be provided during - bdr_failover events, which is what is of interest here. + Note that %c and %a are only provided with + particular failover events, in this case bdr_failover. - The provided sample script (`scripts/bdr-pgbouncer.sh`) is configured like - this: + The provided sample script (`scripts/bdr-pgbouncer.sh`) is configured as follows: event_notification_command='/path/to/bdr-pgbouncer.sh %n %e %s "%c" "%a"' - and parses the configures parameters like this: + and parses the placeholder parameters like this: NODE_ID=$1 EVENT_TYPE=$2 @@ -252,12 +263,14 @@ NEXT_CONNINFO=$4 NEXT_NODE_NAME=$5 - - The script also contains some hard-coded values about the PgBouncer - configuration for both nodes; these will need to be adjusted for your local environment - (ideally the scripts would be maintained as templates and generated by some - kind of provisioning system). - + + + The sample script also contains some hard-coded values for the PgBouncer + configuration for both nodes; these will need to be adjusted for your local environment + (ideally the scripts would be maintained as templates and generated by some + kind of provisioning system). + + The script performs following steps: