Skip to content

fix: plumb real hostgroup_id for pgsql replication lag monitoring

ff1398e
Select commit
Loading
Failed to load commit list.
Merged

feat: add 'replication_lag' support for PostgreSQL monitoring #5422

fix: plumb real hostgroup_id for pgsql replication lag monitoring
ff1398e
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Mar 6, 2026 in 8m 12s

Quality Gate failed

Failed conditions
3 Security Hotspots
E Reliability Rating on New Code (required ≥ A)
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check failure on line 18 in test/tap/groups/pgsql-repl/conf/proxysql/config.sql

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Ensure that the WHERE clause is not missing in this DELETE query.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zHSkv9arOIsq09h&open=AZyQ4zHSkv9arOIsq09h&pullRequest=5422

Check failure on line 19 in include/PgSQL_Monitor.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this macro by "const", "constexpr" or an "enum".

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zI0kv9arOIsq09j&open=AZyQ4zI0kv9arOIsq09j&pullRequest=5422

Check failure on line 7 in test/tap/groups/pgsql-repl/conf/proxysql/config.sql

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Ensure that the WHERE clause is not missing in this DELETE query.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zHSkv9arOIsq09g&open=AZyQ4zHSkv9arOIsq09g&pullRequest=5422

Check warning on line 1980 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK-kv9arOIsq09o&open=AZyQ4zK-kv9arOIsq09o&pullRequest=5422

Check failure on line 28 in test/tap/tests/test_pgsql_replication_lag-t.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this function-like macro with a C++ function or another construct.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4y_0kv9arOIsq09W&open=AZyQ4y_0kv9arOIsq09W&pullRequest=5422

Check failure on line 14 in test/tap/groups/pgsql-repl/bin/docker-proxy-post.bash

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zGwkv9arOIsq09Z&open=AZyQ4zGwkv9arOIsq09Z&pullRequest=5422

Check failure on line 65 in include/PgSQL_Monitor.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zI0kv9arOIsq09l&open=AZyQ4zI0kv9arOIsq09l&pullRequest=5422

Check failure on line 1648 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK_kv9arOIsq09u&open=AZyQ4zK_kv9arOIsq09u&pullRequest=5422

Check warning on line 16 in test/tap/groups/pgsql-repl/bin/docker-proxy-post.bash

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zGwkv9arOIsq09Y&open=AZyQ4zGwkv9arOIsq09Y&pullRequest=5422

Check failure on line 27 in test/tap/groups/pgsql-repl/conf/proxysql/config.sql

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Ensure that the WHERE clause is not missing in this DELETE query.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zHSkv9arOIsq09i&open=AZyQ4zHSkv9arOIsq09i&pullRequest=5422

Check failure on line 15 in test/tap/groups/pgsql-repl/bin/docker-proxy-post.bash

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zGwkv9arOIsq09a&open=AZyQ4zGwkv9arOIsq09a&pullRequest=5422

Check failure on line 14 in test/tap/groups/pgsql-repl/bin/docker-pgsql-post.bash

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zG4kv9arOIsq09c&open=AZyQ4zG4kv9arOIsq09c&pullRequest=5422

Check failure on line 64 in include/PgSQL_Monitor.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zI0kv9arOIsq09k&open=AZyQ4zI0kv9arOIsq09k&pullRequest=5422

Check failure on line 361 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Customize this struct's destructor to participate in resource management.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK-kv9arOIsq09p&open=AZyQ4zK-kv9arOIsq09p&pullRequest=5422

Check warning on line 1975 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK-kv9arOIsq09n&open=AZyQ4zK-kv9arOIsq09n&pullRequest=5422

Check failure on line 658 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK_kv9arOIsq09r&open=AZyQ4zK_kv9arOIsq09r&pullRequest=5422

Check warning on line 16 in test/tap/groups/pgsql-repl/bin/docker-pgsql-post.bash

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Redirect this error message to stderr (>&2).

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyVcAWluzYAraqzuSlY&open=AZyVcAWluzYAraqzuSlY&pullRequest=5422

Check failure on line 20 in test/tap/groups/pgsql-repl/docker-compose.yaml

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"PASSWORD" detected here, make sure this is not a hard-coded credential.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zHAkv9arOIsq09e&open=AZyQ4zHAkv9arOIsq09e&pullRequest=5422

Check failure on line 675 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rewrite the code so that you no longer need this "delete".

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK_kv9arOIsq09s&open=AZyQ4zK_kv9arOIsq09s&pullRequest=5422

Check failure on line 633 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 27 to the 25 allowed.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK_kv9arOIsq09q&open=AZyQ4zK_kv9arOIsq09q&pullRequest=5422

Check warning on line 1855 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK-kv9arOIsq09m&open=AZyQ4zK-kv9arOIsq09m&pullRequest=5422

Check failure on line 675 in lib/PgSQL_Monitor.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this use of "void *" with a more meaningful type.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zK_kv9arOIsq09v&open=AZyQ4zK_kv9arOIsq09v&pullRequest=5422

Check failure on line 15 in test/tap/groups/pgsql-repl/bin/docker-pgsql-post.bash

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=sysown_proxysql&issues=AZyQ4zG4kv9arOIsq09d&open=AZyQ4zG4kv9arOIsq09d&pullRequest=5422