Skip to content

Third-Party Notices

pgEdge pg-healthcheck

The check-body SQL logic inside this project's built-in check functions (the queries against PostgreSQL's own connection, settings, archiver, and lock statistics views, among others) is a PL/pgSQL port of the data-collection logic found in:

pgEdge / pg-healthcheckgithub.com/pgEdge/pg-healthcheck — Copyright (c) 2025–2026, pgEdge, Inc.

Specifically, the SQL statements embedded as string literals inside that upstream project's own check-group source files were extracted, adapted from their original Go-language string literals into standalone PL/pgSQL, and had all severity and threshold decision logic (the comparisons upstream performs after each query) removed, leaving only raw data collection plus the classification metadata (result type, numeric direction, and so on — see Metadata Columns Explained in the Catalog book) this project adds on top. Each of this project's own check-group SQL files names, in its own header comment, the specific upstream source file its checks were derived from.

No compiled or interpreted Go code from pg-healthcheck is included in this project — only the SQL text embedded in that Go code, ported to a different language (PL/pgSQL) and a different execution model (functions running inside the database, dispatched by a generic engine, instead of an external program with a hardcoded per-check orchestration).

Checks not ported

20 of the upstream project's checks are deliberately not part of this project — not ported, not registered, with no placeholder function permanently reporting itself as skipped either. Earlier revisions of this project did carry them as such placeholders, classified by what they would have measured so the catalog stayed forward-compatible, but they were removed outright once it became clear they would never collect real data in any configuration: the upstream project's external program can open network connections, and read the host machine's own filesystem directly; a function running inside PostgreSQL structurally cannot do either. Removed, by upstream source area:

  • Connection checks (3 of 9) — network port reachability (a check performed from outside any database session entirely), connection response-time (a client-side round-trip measurement, meaningless measured from the endpoint being timed), and TLS certificate expiry (needs a raw network socket to inspect the certificate directly).
  • pgBackRest configuration checks (13 of 15) — every check reading pgBackRest's own configuration file (a file on the host machine with no SQL-accessible equivalent), listing files under the data directory's own archive-status folder on the host filesystem, or calling out to the pgBackRest command-line tool directly.
  • Operating-system resource checks (3 of 11) — Linux-specific kernel settings, and data-directory disk space (which needs a direct filesystem-level query the database itself has no access to).
  • WAL growth checks (1 of 14) — write-ahead log filesystem usage percentage, for the same filesystem-access reason as above.

This project's own User Guide and Adding Your Own Checks books document exactly which checks remain in each affected category, and recommend external tooling instead for the removed ones — the pg_isready command-line tool, direct TLS inspection tools, the pgBackRest command-line tool, or general server-monitoring tools that already read filesystem statistics. This narrows what's actually derived from upstream in those affected categories relative to earlier revisions of this project — the Attribution Summary below describes what remains.

Licence

pg-healthcheck is distributed under The PostgreSQL Licence, a permissive, BSD/MIT-style licence. That licence requires its copyright notice and accompanying paragraphs to appear in all copies and derivative works. The full, verbatim text is reproduced below as required:

The PostgreSQL License

Portions copyright (c) 2025 - 2026, pgEdge, Inc.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written
agreement is hereby granted, provided that the above copyright notice
and this paragraph and the following two paragraphs appear in all
copies.

IN NO EVENT SHALL pgEdge, Inc. BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
DOCUMENTATION, EVEN IF pgEdge, Inc. HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

pgEdge, Inc. SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
"AS IS" BASIS, AND pgEdge, Inc. HAS NO OBLIGATIONS TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Source of this licence text: github.com/pgEdge/pg-healthcheck/blob/main/LICENSE (retrieved unmodified from the upstream repository).

Attribution summary

This project Derived from
Schema design (the check-result type, and the namespace/category/check/suite/run/raw-result/run-config tables) Original to this project. The upstream project has no database-side schema at all — it is an external program with no persistent storage of its own.
Core registration helpers (Spock detection, internal logging, and every namespace/category/check/suite registration function) Original to this project.
The 15 check-group SQL files backing the 175 built-in checks Check-body SQL query text adapted from the corresponding upstream source file; several checks' rationale text is likewise adapted from that source's own comments. Each check's classification metadata is original to this project. Not every upstream check has a corresponding port — see Checks Not Ported above. One check has since been modified beyond its original port: the logical-replication subscription health check — its query body is still the unmodified port from upstream's WAL/replication-slots check group, but its name, rationale, and remediation guidance were broadened, and it was given a dedicated evaluator (see the row below) that thresholds its apply/sync error-count data, a condition the upstream project never evaluates at all — this project's own addition, not present in the upstream source. Ten checks in these same files have no upstream equivalent at all, added against PostgreSQL 14–18 catalog views and settings that postdate the upstream project's own catalog coverage entirely — parallel-worker saturation, WAL I/O timing tracking, TOAST compression choice, buffer-pool eviction pressure by context, relation-extend I/O pressure, incremental-backup readiness, failover-ready logical slot sync, standby restartpoint completion, the MAINTAIN privilege audit, and async I/O method visibility. 100% original code, query bodies and all — see the project repository's PROPOSED_CHECKS.md for the design record.
The seeded-suite helper function Original to this project — used to build the seeded cadence suites (seeded-1m through seeded-on-demand), which have no upstream equivalent (upstream runs everything unconditionally).
The generic collection dispatch engine Original to this project. Upstream's equivalent orchestration is external-program code with a hardcoded check list, not a data-driven SQL dispatcher — not copied.
The threshold-evaluation schema, registration functions, evaluation dispatch engine, and the events notification layer Original to this project. The four real alert levels (ok/info/warning/critical) match the upstream project's own severity model, adopted deliberately rather than invented; the four further ranked states this project's own severity scale adds around them (skipped, not_evaluable, invalid, error_in_performing_check — see Metadata Columns Explained and How Threshold Evaluation Works) have no upstream equivalent at all. The comparator, dispatch, debounce/hysteresis, and notification code itself is original — upstream has no shared generic threshold comparator, no debounce or hysteresis concept, and no event or notification mechanism at all, to derive from.
The seeded default threshold values, and the seven built-in custom evaluator functions The threshold values are mined from upstream's own configuration defaults and the literal constants embedded in its check-group source — reference points carried over as real-world-tuned starting values, not invented from scratch. The custom evaluator functions themselves are original code. Five implement a pattern equivalent to an upstream check — e.g. the rolling WAL-rate baseline evaluator, reading this project's own raw-results history directly instead of an external state file. Two have no upstream equivalent at all: the logical-replication subscription-health evaluator (see the modified-check note above) and the TOAST-compression evaluator (upstream predates default_toast_compression entirely).
The retention/purge functions Original to this project. Upstream has no retention or purge mechanism of its own (it writes no persistent history to prune) — not derived from anything.
The single catalog-seeding entry point Original to this project — the one upsert-based function that seeds the built-in namespace, its 15 categories, all 175 built-in checks (rationale and values attributed above), the seeded suites, and the default thresholds. See Checks Not Ported above for the 20 upstream checks with no corresponding row at all.
The documentation site's Check Reference (one page per category, listing every check's rationale and remediation guidance) The per-check text reproduced on each page comes straight from the catalog itself, attributed per-check above. Each page's one-paragraph category introduction is original writing for this project, informed by — and in places paraphrasing the framing of — the upstream project's own README documentation for its equivalent groupings, though not a verbatim reproduction; this project's category boundaries, names, and check counts differ from upstream's in several places.

This chapter exists to satisfy the attribution and notice-preservation terms of The PostgreSQL Licence for the portions of this project derived from pg-healthcheck. It does not itself grant any additional rights; refer to the licence text above for the actual terms governing the upstream-derived portions, and to The Full Licence Text for the terms governing this project's own original code.