pg_datasentinel
Observability and activity monitoring extension for PostgreSQL
Repository
datasentinel/pg_datasentinel
https://github.com/datasentinel/pg_datasentinel
Source
pg_datasentinel-1.0.tar.gz
pg_datasentinel-1.0.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_datasentinel | 1.0 | STAT | BSD-3-Clause | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 6400 | pg_datasentinel | No | Yes | Yes | Yes | No | No | - |
| Related | pgsentinel pg_profile pg_stat_monitor pg_wait_sampling pg_stat_ch pgmonitor system_stats powa pgnodemx pg_stat_statements |
|---|
shared_preload_libraries = pg_datasentinel is required because the extension allocates shared memory and hooks into activity logging.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | pg_datasentinel | - |
| RPM | PIGSTY | 1.0 | 1817161514 | pg_datasentinel_$v | - |
| DEB | PIGSTY | 1.0 | 1817161514 | postgresql-$v-pg-datasentinel | - |
Build
You can build the RPM / DEB packages for pg_datasentinel using pig build:
Install
You can install pg_datasentinel directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Preload:
Create Extension:
Usage
Source: README, Release 1.0
pg_datasentinel adds observability views on top of PostgreSQL activity, maintenance, temporary-file, checkpoint, wraparound, and container resource data. It must be preloaded because it allocates shared memory and hooks into activity logging.
Required setup
Main views
ds_stat_activity: extendspg_stat_activitywith backend RSS, optional PSS, temp-file bytes, andplan_idon PostgreSQL 18+.ds_container_resources: reports cgroup CPU and memory limits plus current usage.ds_wraparound_risk: estimates XID and MXID ETA to aggressive vacuum and wraparound from hourly snapshots.ds_xid_snapshots: raw snapshot history used byds_wraparound_risk.ds_vacuum_activity,ds_analyze_activity,ds_tempfile_activity,ds_checkpoint_activity: shared-memory ring buffers for maintenance and checkpoint events.ds_activity_summary: one-row summary of ring-buffer occupancy and timestamps.
Useful GUCs
pg_datasentinel.enabled: enables or disables capture.pg_datasentinel.max_entries: ring-buffer capacity per activity stream; restart required.pg_datasentinel.maintenance_force_verbose: addsVERBOSEto manualVACUUMandANALYZEso they are captured.pg_datasentinel.ignore_system_schemas: suppressespg_catalogandinformation_schemanoise.pg_datasentinel.enable_pss_memory: reads/proc/*/smaps_rollupfor per-backend PSS.
Caveats
- PostgreSQL 15+ is required upstream.
- Memory and temp-file enrichment depends on Linux
/proc; container metrics depend on cgroups. - Vacuum and analyze parsing depends on English log keywords, so translated server message locales are not fully supported.
plan_idis only populated on PostgreSQL 18+, and is most useful when paired with the officialpg_store_plansfork linked from the README.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)