The majority of BiHA specifics is done automatically, with few parameters available for manual editing.
Configuration parameters that can be useful:
biha.can_be_leader (boolean)
#
Determines the ability of a node to become the leader. The default value
is true. If set to false, the node
cannot stand as a candidate in elections of the new leader.
biha.can_vote (boolean)
#
Determines whether a node is allowed to vote. The default value
is true. If set to false, the node
cannot vote, as well as cannot stand as a candidate in elections of the
new leader.
biha.flw_ro (boolean)
#
Determines whether a follower is available for read operations. If set to
off, reading from this follower is prohibited. The
default value is on.
biha.heartbeat_max_lost (integer)
#
Specifies the maximum number of heartbeats that can be missed before the
node is considered offline. The default
value is 10.
biha.heartbeat_send_period (integer)
#
Specifies the heartbeat sending frequency, in milliseconds.
The default value is 1000.
biha.BihaLog_log_level (enum)
#
Specifies the logging level to provide general information about the
operation of BiHA components. The default
value is LOG.
biha.BcpTransportDebug_log_level (enum)
#
Specifies the logging level to provide debugging information about the
control channel operation. The default value is DEBUG4.
biha.BcpTransportDetails_log_level (enum)
#
Specifies the logging level to provide detailed information about the
control channel operation. The default value is DEBUG4.
biha.BcpTransportLog_log_level (enum)
#
Specifies the logging level to provide general information about the
control channel operation. The default value is DEBUG4.
biha.BcpTransportWarn_log_level (enum)
#
Specifies the logging level to provide warnings of likely problems in
the control channel. The default value is DEBUG4.
biha.NodeControllerDebug_log_level (enum)
#
Specifies the logging level to provide debugging information about the
node controller operation. The default value is DEBUG4.
biha.NodeControllerDetails_log_level (enum)
#
Specifies the logging level to provide detailed information about the
node controller operation. The default value is DEBUG4.
biha.NodeControllerLog_log_level (enum)
#
Specifies the logging level to provide general information about the
node controller operation. The default value is DEBUG4.
biha.NodeControllerWarn_log_level (enum)
#
Specifies the logging level to provide warnings of likely problems in
the node controller. The default value is DEBUG4.
All functions listed below should be called from the biha_db
database:
biha.error_details () returns setof record
#
Returns the description of why the node transferred to the
NODE_ERROR state. The returned record contains the
type of the error, its details, the place it occurred specifying
begin_lsn, end_lsn, and identifier
of the current and the next timeline, as well as
replay_lsn.
biha.nodes () returns setof record
#
Defines the biha.nodes_v view, which
is described in detail in the biha.nodes_v
section.
biha.status () returns setof record
#
Defines the biha.status_v view, which
is described in detail in the biha.status_v
section. If the node does not respond when trying to display the view,
try the same request on any other node to learn the actual state of
cluster nodes.
To query the views listed below, you must first connect to
the biha_db database.
biha.nodes_v #
This view displays the connection status of nodes in the cluster.
For the node that the view is queried on, the following columns contain
NULL: state, since_conn_start,
conn_count.
Table 25.1. The biha.nodes_v view
| Column Name | Description |
|---|---|
id | The node ID. |
host | The host of the node. |
port | The port of the node. |
state |
The connection state of the node. This column may contain one of the
following values: ACTIVE,
CONNECTING, IDLE, or
INIT.
|
since_conn_start | The time since the node connection. |
conn_count | The number of times the node was connected since the start of the cluster. |
biha.status_v #This view displays the state of nodes in the cluster.
Table 25.2. The biha.status_v View
| Column Name | Description |
|---|---|
id | The node ID. |
leader_id | The leader node ID. |
term | The term of the node. This is used for the purposes of the leader election. |
online | Shows whether the node is online. |
state |
The state of the node. This column may contain one of the following values:
|
last_known_state | The last known state of the node. |
since_last_hb | The time since the last received heartbeat message. |