Catalog Seeding¶
pghf.seed_data()¶
The only place this framework's own catalog data — the built-in namespace, its 15 categories, all built-in checks, the ready-made suites, and their default thresholds — actually gets written. Fully idempotent: safe to call again at any time to reset the built-in catalog back to what your installed version ships, for example after an extension upgrade.
Preserved across a re-seed: whether a namespace or category is active, and whether a check is retired (along with its retirement reason) — an administrator's own activation or retirement choices are never touched by this function. Not preserved: every other field — display name, backing function, rationale, default threshold values, and so on — is fully reset to whatever this call ships. Per-suite threshold overrides are never touched by this function at all.
Also gates a handful of extension-dependent checks (those needing pg_stat_statements, amcheck, or pg_visibility) on whether that extension is actually installed on this server, reporting and skipping registration when it's absent rather than registering a check that would only ever report itself as skipped.
Called once automatically at the end of installation (whether by CREATE EXTENSION or a plain SQL load); re-runnable by a superuser (or any role granted permission) at any time afterwards.
Parameters: none.
Returns: nothing. Only a role explicitly granted permission can call this.
That's every public function and procedure in pg_health_framework. For narrative walkthroughs and worked examples rather than bare signatures, see the User Guide, Adding Your Own Checks, and Events books.