fix: resolve PostgreSQL cluster sync compilation issues

- Add missing set_metrics() function to ProxySQL_Node_Entry class
- Fix undefined 'd_query' variable in PostgreSQL variables function
- Remove deprecated PostgreSQL functions integrated into pgsql_servers sync
- Add missing admin variables for PostgreSQL modules
- Fix structural compilation issues in set_checksums function
- PostgreSQL cluster sync now builds successfully for both debug and regular builds

Resolves linking errors and compilation failures that prevented
debug and regular builds from completing successfully.
fix/postgresql-cluster-sync
Rene Cannao 4 months ago
parent 086edfe307
commit d64b4c85d8

@ -691,7 +691,5 @@ public:
const runtime_pgsql_servers_checksum_t& peer_runtime_pgsql_server = {}, bool fetch_runtime_pgsql_servers = false);
void pull_pgsql_users_from_peer(const std::string& expected_checksum, const time_t epoch);
void pull_pgsql_variables_from_peer(const std::string& expected_checksum, const time_t epoch);
void pull_pgsql_replication_hostgroups_from_peer(const std::string& expected_checksum, const time_t epoch);
void pull_pgsql_hostgroup_attributes_from_peer(const std::string& expected_checksum, const time_t epoch);
};
#endif /* CLASS_PROXYSQL_CLUSTER_H */

@ -313,6 +313,7 @@ class ProxySQL_Admin {
int cluster_mysql_variables_diffs_before_sync;
int cluster_admin_variables_diffs_before_sync;
int cluster_ldap_variables_diffs_before_sync;
int cluster_pgsql_variables_diffs_before_sync;
int cluster_pgsql_query_rules_diffs_before_sync;
int cluster_pgsql_servers_diffs_before_sync;
int cluster_pgsql_users_diffs_before_sync;
@ -324,6 +325,7 @@ class ProxySQL_Admin {
bool cluster_mysql_variables_save_to_disk;
bool cluster_admin_variables_save_to_disk;
bool cluster_ldap_variables_save_to_disk;
bool cluster_pgsql_variables_save_to_disk;
bool cluster_pgsql_query_rules_save_to_disk;
bool cluster_pgsql_servers_save_to_disk;
bool cluster_pgsql_users_save_to_disk;
@ -503,6 +505,7 @@ class ProxySQL_Admin {
bool checksum_mysql_variables;
bool checksum_admin_variables;
bool checksum_ldap_variables;
bool checksum_pgsql_variables;
} checksum_variables;
template<enum SERVER_TYPE pt>
void public_add_active_users(enum cred_username_type usertype, char *user=NULL) {

@ -403,13 +403,14 @@ static char * admin_variables_names[]= {
(char *)"cluster_pgsql_query_rules_save_to_disk",
(char *)"cluster_pgsql_servers_save_to_disk",
(char *)"cluster_pgsql_users_save_to_disk",
(char *)"cluster_mysql_servers_sync_algorithm",
(char *)"cluster_mysql_servers_sync_algorithm",
(char *)"checksum_mysql_query_rules",
(char *)"checksum_mysql_servers",
(char *)"checksum_mysql_users",
(char *)"checksum_mysql_variables",
(char *)"checksum_admin_variables",
(char *)"checksum_ldap_variables",
(char *)"checksum_pgsql_variables",
(char *)"restapi_enabled",
(char *)"restapi_port",
(char *)"web_enabled",
@ -2635,13 +2636,14 @@ ProxySQL_Admin::ProxySQL_Admin() :
variables.cluster_pgsql_query_rules_diffs_before_sync = 3;
variables.cluster_pgsql_servers_diffs_before_sync = 3;
variables.cluster_pgsql_users_diffs_before_sync = 3;
variables.cluster_mysql_servers_sync_algorithm = 1;
variables.cluster_mysql_servers_sync_algorithm = 1;
checksum_variables.checksum_mysql_query_rules = true;
checksum_variables.checksum_mysql_servers = true;
checksum_variables.checksum_mysql_users = true;
checksum_variables.checksum_mysql_variables = true;
checksum_variables.checksum_admin_variables = true;
checksum_variables.checksum_ldap_variables = true;
checksum_variables.checksum_pgsql_variables = true;
variables.cluster_mysql_query_rules_save_to_disk = true;
variables.cluster_mysql_servers_save_to_disk = true;
variables.cluster_mysql_users_save_to_disk = true;
@ -2653,7 +2655,7 @@ ProxySQL_Admin::ProxySQL_Admin() :
variables.cluster_pgsql_query_rules_save_to_disk = true;
variables.cluster_pgsql_servers_save_to_disk = true;
variables.cluster_pgsql_users_save_to_disk = true;
variables.stats_mysql_connection_pool = 60;
variables.stats_mysql_connection_pool = 60;
variables.stats_mysql_connections = 60;
variables.stats_mysql_query_cache = 60;
variables.stats_mysql_query_digest_to_disk = 0;

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save