Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second iteration on PostgreSQL monitoring POC - Read-Only Support #4726

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

JavierJF
Copy link
Collaborator

@JavierJF JavierJF commented Oct 24, 2024

This PR packs multiple fixes/improvements:

  • Added READONLY support for PostgreSQL.
  • Major rework for queries and statements used on monitoring checks:
    • Checks/Actions rewrote for single instance checks.
    • Reuse of prepared statements instance of re-preparation.
  • Fixed missing error handling in connection creation state machine.
  • Fixed connection rotation in connection pool (now FIFO).
  • Added support for configurable batching in scheduler thread, via
    '*_interval_window' variables. These variables allows to define the
    burstiness of the scheduling within the processing interval.
  • Added new config variable 'pgsql-monitor_dbname'. Allows to control
    which 'db' will be target by monitoring connections.
  • Several fixes for 'poll' timeout computation for worker threads.
  • Fixed edge cases for current interval detection.
  • Reduced deviation in scheduling intervals computation.
  • Refactored and simplified connection event handling.
  • Improved error messages for monitoring actions.
  • Replaced several invalid uses of 'mysql_thread___monitor_' in
    favor or new 'mysql_thread___monitor_
    ' variables.
  • Honor '-M' argument for disabling monitoring support.

There are still a couple of missing points on the implementation, these are flagged as TODO in the code itself.

@mirostauder
Copy link
Collaborator

Can one of the admins verify this patch?

@JavierJF JavierJF force-pushed the v3.0-postgres_read_only branch from b37713c to ca61c1f Compare October 24, 2024 07:57
@mirostauder
Copy link
Collaborator

retest this please

This commit packs multiple fixes/improvements:

- Added READONLY support for PostgreSQL.
- Major rework for queries and statements used on monitoring checks:
    + Checks/Actions rewrote for single instance checks.
    + Reuse of prepared statements instance of re-preparation.
- Fixed missing error handling in connection creation state machine.
- Fixed connection rotation in connection pool (now FIFO).
- Added support for configurable batching in scheduler thread, via
  '*_interval_window' variables. These variables allows to define the
  burstiness of the scheduling within the processing interval.
- Added new config variable 'pgsql-monitor_dbname'. Allows to control
  which 'db' will be target by monitoring connections.
- Several fixes for 'poll' timeout computation for worker threads.
- Fixed edge cases for current interval detection.
- Reduced deviation in scheduling intervals computation.
- Refactored and simplified connection event handling.
- Improved error messages for monitoring actions.
- Replaced several invalid uses of 'mysql_thread___monitor_*' in
  favor or new 'mysql_thread___monitor_*' variables.
- Honor '-M' argument for disabling monitoring support.
@JavierJF JavierJF force-pushed the v3.0-postgres_read_only branch from ca61c1f to 12a5c31 Compare November 1, 2024 13:11
@renecannao renecannao merged commit 85d8445 into v3.0 Nov 11, 2024
90 of 118 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants