Skip to content
pg_roast

pg_roast

pg_roast : Opinionated PostgreSQL database auditor

Overview

ID Extension Package Version Category License Language
7120
pg_roast
pg_roast
1.0
SEC
PostgreSQL
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--sLd--
No
Yes
Yes
Yes
no
no
Relationships
Schemas roast
See Also
pglinter
pg_profile
pg_stat_statements

Upstream has no release tag; package pins main commit ccbf012. Manual audits work normally; the periodic background worker requires shared_preload_libraries=pg_roast.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
1.0
18
17
16
15
14
pg_roast -
RPM
PIGSTY
1.0
18
17
16
15
14
pg_roast_$v -
DEB
PIGSTY
1.0
18
17
16
15
14
postgresql-$v-pg-roast -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el8.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el9.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el9.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el10.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
el10.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d12.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d12.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d13.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
d13.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u22.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u22.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u24.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u24.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u26.x86_64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
u26.aarch64
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
PIGSTY 1.0
Package Version OS ORG SIZE File URL
pg_roast_18 1.0 el8.x86_64 pigsty 31.6 KiB pg_roast_18-1.0-1PIGSTY.el8.x86_64.rpm
pg_roast_18 1.0 el8.aarch64 pigsty 32.0 KiB pg_roast_18-1.0-1PIGSTY.el8.aarch64.rpm
pg_roast_18 1.0 el9.x86_64 pigsty 31.2 KiB pg_roast_18-1.0-1PIGSTY.el9.x86_64.rpm
pg_roast_18 1.0 el9.aarch64 pigsty 31.3 KiB pg_roast_18-1.0-1PIGSTY.el9.aarch64.rpm
pg_roast_18 1.0 el10.x86_64 pigsty 31.3 KiB pg_roast_18-1.0-1PIGSTY.el10.x86_64.rpm
pg_roast_18 1.0 el10.aarch64 pigsty 31.6 KiB pg_roast_18-1.0-1PIGSTY.el10.aarch64.rpm
postgresql-18-pg-roast 1.0 d12.x86_64 pigsty 31.1 KiB postgresql-18-pg-roast_1.0-1PIGSTY~bookworm_amd64.deb
postgresql-18-pg-roast 1.0 d12.aarch64 pigsty 31.0 KiB postgresql-18-pg-roast_1.0-1PIGSTY~bookworm_arm64.deb
postgresql-18-pg-roast 1.0 d13.x86_64 pigsty 31.1 KiB postgresql-18-pg-roast_1.0-1PIGSTY~trixie_amd64.deb
postgresql-18-pg-roast 1.0 d13.aarch64 pigsty 31.1 KiB postgresql-18-pg-roast_1.0-1PIGSTY~trixie_arm64.deb
postgresql-18-pg-roast 1.0 u22.x86_64 pigsty 32.5 KiB postgresql-18-pg-roast_1.0-1PIGSTY~jammy_amd64.deb
postgresql-18-pg-roast 1.0 u22.aarch64 pigsty 32.2 KiB postgresql-18-pg-roast_1.0-1PIGSTY~jammy_arm64.deb
postgresql-18-pg-roast 1.0 u24.x86_64 pigsty 32.0 KiB postgresql-18-pg-roast_1.0-1PIGSTY~noble_amd64.deb
postgresql-18-pg-roast 1.0 u24.aarch64 pigsty 31.8 KiB postgresql-18-pg-roast_1.0-1PIGSTY~noble_arm64.deb
postgresql-18-pg-roast 1.0 u26.x86_64 pigsty 31.8 KiB postgresql-18-pg-roast_1.0-1PIGSTY~resolute_amd64.deb
postgresql-18-pg-roast 1.0 u26.aarch64 pigsty 31.8 KiB postgresql-18-pg-roast_1.0-1PIGSTY~resolute_arm64.deb

Source

pig build pkg pg_roast;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pg_roast;		# install via package name, for the active PG version

pig install pg_roast -v 18;   # install for PG 18
pig install pg_roast -v 17;   # install for PG 17
pig install pg_roast -v 16;   # install for PG 16
pig install pg_roast -v 15;   # install for PG 15
pig install pg_roast -v 14;   # install for PG 14

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'pg_roast';

Create this extension with:

CREATE EXTENSION pg_roast;

Usage

Sources:

pg_roast runs opinionated PostgreSQL health checks and stores findings in its fixed roast schema. It checks configuration, schema design, indexes, vacuum and bloat indicators, security posture, replication, connections, and workload signals. Version 1.0 targets PostgreSQL 14 and later.

Manual audits

Manual mode does not require preloading:

CREATE EXTENSION pg_roast;

SELECT * FROM roast.run();
SELECT severity, check_name, object_name, roast
FROM roast.latest
ORDER BY severity, check_name;

SELECT * FROM roast.summary;

Each run persists audit history and findings. Use the latest view for the newest run and the summary view for grouped results.

Scheduled audits

The optional background worker requires preload configuration and a restart:

shared_preload_libraries = 'pg_roast'
pg_roast.database = 'mydb'
pg_roast.interval = 3600

The database setting is fixed at server start. Review the upstream settings before enabling automatic audits across a production workload.

Caveats

  • Findings are heuristic advice, not automatic proof of a defect. Review workload context, maintenance windows, and PostgreSQL documentation before applying any recommendation.
  • Audits execute catalog and statistics queries and write history tables. Measure overhead on large catalogs and protect the roast schema from untrusted users.
  • Results can expose object names, configuration, security findings, and query-related operational details. Apply least privilege and an explicit retention policy.
  • Preloading is unnecessary for manual runs but mandatory for the background worker; changing startup-only settings requires a restart.
Last updated on