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 User Guide) 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 165 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.
The two seeded-suite helper functions Original to this project — used to build the two seeded suites (default, default_no_spock), 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-level severity scale (ok/info/warning/critical) matches the upstream project's own severity model, adopted deliberately rather than invented; the comparator, dispatch, and notification code itself is original — upstream has no shared generic threshold comparator, and no event or notification mechanism at all, to derive from.
The seeded default threshold values, and the five 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, including the rolling WAL-rate baseline evaluator (implementing a pattern equivalent to an upstream check, but reading this project's own raw-results history directly instead of an external state file), are original code.
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 165 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.

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.