Skip to content

Add PostgreSQL multi-database monitoring - #177

Merged
Areson merged 6 commits into
ioberst/bgblip-modulefrom
ioberst/multi-database-monitor
Aug 7, 2026
Merged

Add PostgreSQL multi-database monitoring#177
Areson merged 6 commits into
ioberst/bgblip-modulefrom
ioberst/multi-database-monitor

Conversation

@Areson

@Areson Areson commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Why

Let pgblip own multiple database pools and discover PostgreSQL database targets without duplicating Blip's monitor lifecycle.

What

  • Add PostgreSQL database selection and discovery configuration
  • Add monitor-owned database providers with deterministic shutdown
  • Preserve the legacy single-database factory path for existing MySQL consumers

Risk Assessment

Low — this targets the unreleased PostgreSQL feature branch, while legacy factories continue through the existing single-database compatibility path.

Stack

  1. Support external database modules #176 ioberst/bgblip-modulemain
  2. This PR: Add PostgreSQL multi-database monitoring #177 ioberst/multi-database-monitorioberst/bgblip-module
  3. Harden PostgreSQL monitor lifecycle #174 Areson/postgres-config-guardsioberst/multi-database-monitor
  4. Generalize external database modules #175 Areson/database-module-extensibilityAreson/postgres-config-guards

Generated with Codex

Areson and others added 5 commits July 23, 2026 18:31
Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
Co-authored-by: Goose <opensource@block.xyz>
Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
* Guard PostgreSQL monitor configuration

Keep MySQL-only heartbeat and plan defaults off PostgreSQL monitors, reject explicit unsupported settings, and sign IAM tokens with the database-specific default port.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Close PostgreSQL integration gaps

Cancel and join plan preparation before closing monitor-owned database resources, and reject the remaining MySQL-only plan configurations for PostgreSQL.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Require PostgreSQL exporter plans

Avoid assigning the MySQL default exporter plan to PostgreSQL monitors. Require a named plan whenever exporter mode is enabled for PostgreSQL while preserving the public and MySQL defaulting behavior.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Coordinate monitor subsystem teardown

Roll back partial startup failures, bind subsystem stops to their startup generation, and retain exporter engines for cleanup before database providers close. Collector cleanup now also runs when a prepared collector is idle.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Join collectors before provider shutdown

Track every engine collector goroutine, cancel active runs during teardown, and wait for foreground or ErrMore background work before invoking cleanup and releasing the database provider.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Generalize external database modules (#175)

* Generalize external database modules

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true

* Interpolate typed database config values

Preserve named and typed containers when Blip expands environment and monitor placeholders in opaque module configuration. This keeps programmatic config loaders consistent with YAML-loaded config.

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true

---------

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
@Areson
Areson marked this pull request as ready for review August 7, 2026 16:40
@Areson
Areson merged commit 755e27e into ioberst/bgblip-module Aug 7, 2026
1 check passed
Areson added a commit that referenced this pull request Aug 7, 2026
* Configure PostgreSQL database discovery

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
Co-authored-by: Goose <opensource@block.xyz>

* Add monitor-owned database providers

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true

* Keep provider constructors internal

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true

* Harden PostgreSQL monitor lifecycle (#174)

* Guard PostgreSQL monitor configuration

Keep MySQL-only heartbeat and plan defaults off PostgreSQL monitors, reject explicit unsupported settings, and sign IAM tokens with the database-specific default port.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Close PostgreSQL integration gaps

Cancel and join plan preparation before closing monitor-owned database resources, and reject the remaining MySQL-only plan configurations for PostgreSQL.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Require PostgreSQL exporter plans

Avoid assigning the MySQL default exporter plan to PostgreSQL monitors. Require a named plan whenever exporter mode is enabled for PostgreSQL while preserving the public and MySQL defaulting behavior.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Coordinate monitor subsystem teardown

Roll back partial startup failures, bind subsystem stops to their startup generation, and retain exporter engines for cleanup before database providers close. Collector cleanup now also runs when a prepared collector is idle.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Join collectors before provider shutdown

Track every engine collector goroutine, cancel active runs during teardown, and wait for foreground or ErrMore background work before invoking cleanup and releasing the database provider.

Co-authored-by: Codex <noreply@openai.com>

Ai-assisted: true

* Generalize external database modules (#175)

* Generalize external database modules

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true

* Interpolate typed database config values

Preserve named and typed containers when Blip expands environment and monitor placeholders in opaque module configuration. This keeps programmatic config loaders consistent with YAML-loaded config.

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true

---------

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Goose <opensource@block.xyz>
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.

1 participant