Param table
The param table is used to store the configuration of variables in the postgresql.conf file for all nodes in the AntDB cluster. All the variables in the postgresql.conf file can be set in this table and reload the specified node.
The following is a view of the data in the param table via the list param command: For example: Connect to adbmgr and execute:
postgres=# list param;
The sample output is as follows:
nodename | nodetype | key | value |
‘*' | coordinator master | listen_addresses | ‘*' |
‘*' | coordinator master | max_connections | 800 |
‘*' | coordinator master | max_prepared_transactions | 800 |
‘*' | datanode master | max_connections | 1000 |
‘*’ | gtmcoord master | max_connections | 2000 |
Each column of the param table is explained as follows:
Column name | Description |
nodename | AntDB cluster node name, asterisk "*" means all nodetype nodes are configured with the same configuration. |
nodetype | Node type. |
key | Variables in postgresql.conf |
value | The value of the variable corresponding to the key. |
The following are examples of commands commonly used to operate the param table (refer to Chapter 4, Param table related commands, for details on how to use the commands).
-- Add a row to the param table:
set gtmcoord all (max_connections=1200);
set gtmcoord master gc_1(superuser_reserved_connections=13);
set gtmcoord slave gc_2(superuser_reserved_connections=14);
set coordinator all(autovacuum_max_workers=5);
set coordinator coord1(checkpoint_segments=128);
set coordinator coord2(checkpoint_segments=200);
set datanode all(default_statistics_target=100);
set datanode master db1_1 (autovacuum_vacuum_cost_delay='30ms');
set datanode slave db1_2 (autovacuum_vacuum_cost_delay='60ms');
set datanode slave db1_3 (autovacuum_vacuum_cost_delay='90ms');
-- Reset the parameters to their default values:
reset datanode master all ( max_connections);
-- Show all data in the param table:
list param;
Hba table
The hba table is used to manage the configuration items in the pg_hba.conf file that holds all nodes in the AntDB cluster. When a configuration item is added, it is recorded in this table and used to identify it. For the added configuration items, you can display them by list hba command. The explanation of each column of the hba table is as follows:
Column name | Description |
nodename | AntDB cluster node name, asterisk "*" means all nodetype nodes are configured with the same configuration. |
hbavalue | The specific value of the hba configuration item. |
Examples of common commands for hba table operations are as follows (refer to Chapter 4, hba table related commands for specific usage of the commands).
--Add coordinator's hba contents to the hba table:
add hba coordinator all ("host all all 10.0.0.0 8 md5");
--Add datanode's hba contents to the hba table:
add hba datanode all ("host all all 10.0.0.0 8 trust");
--Displays the contents of the hba table:
list hba;
--Delete the contents of the hba table:
drop hba coordinator all ("host all all 10.0.0.0 8 trust");