pglinter

pglinter

pglinter : PostgreSQL Linting and Analysis Extension

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
5090
pglinter
pglinter
1.1.1
ADMIN
PostgreSQL
Rust
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-dt-
No
Yes
No
Yes
no
yes
Relationships
See Also
amcheck
supautils

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
1.1.1
18
17
16
15
14
pglinter-
RPM
PIGSTY
1.1.1
18
17
16
15
14
pglinter_$v-
DEB
PIGSTY
1.1.1
18
17
16
15
14
postgresql-$v-pglinter-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
el8.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
el9.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
el9.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
el10.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
el10.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
d12.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
d12.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
d13.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
d13.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
u22.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
u22.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
u24.x86_64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
u24.aarch64
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PIGSTY 1.1.1
PackageVersionOSORGSIZEFile URL
pglinter_181.1.1el8.x86_64pigsty578.9 KiBpglinter_18-1.1.1-1PIGSTY.el8.x86_64.rpm
pglinter_181.1.1el8.aarch64pigsty441.1 KiBpglinter_18-1.1.1-1PIGSTY.el8.aarch64.rpm
pglinter_181.1.1el9.x86_64pigsty593.2 KiBpglinter_18-1.1.1-1PIGSTY.el9.x86_64.rpm
pglinter_181.1.1el9.aarch64pigsty469.4 KiBpglinter_18-1.1.1-1PIGSTY.el9.aarch64.rpm
pglinter_181.1.1el10.x86_64pigsty592.9 KiBpglinter_18-1.1.1-1PIGSTY.el10.x86_64.rpm
pglinter_181.1.1el10.aarch64pigsty469.6 KiBpglinter_18-1.1.1-1PIGSTY.el10.aarch64.rpm
postgresql-18-pglinter1.1.1d12.x86_64pigsty487.8 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~bookworm_amd64.deb
postgresql-18-pglinter1.1.1d12.aarch64pigsty357.8 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~bookworm_arm64.deb
postgresql-18-pglinter1.1.1d13.x86_64pigsty487.9 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~trixie_amd64.deb
postgresql-18-pglinter1.1.1d13.aarch64pigsty357.9 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~trixie_arm64.deb
postgresql-18-pglinter1.1.1u22.x86_64pigsty540.7 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~jammy_amd64.deb
postgresql-18-pglinter1.1.1u22.aarch64pigsty416.9 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~jammy_arm64.deb
postgresql-18-pglinter1.1.1u24.x86_64pigsty535.9 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~noble_amd64.deb
postgresql-18-pglinter1.1.1u24.aarch64pigsty410.7 KiBpostgresql-18-pglinter_1.1.1-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
pglinter_171.1.1el8.x86_64pigsty578.6 KiBpglinter_17-1.1.1-1PIGSTY.el8.x86_64.rpm
pglinter_171.1.1el8.aarch64pigsty442.9 KiBpglinter_17-1.1.1-1PIGSTY.el8.aarch64.rpm
pglinter_171.1.1el9.x86_64pigsty592.8 KiBpglinter_17-1.1.1-1PIGSTY.el9.x86_64.rpm
pglinter_171.1.1el9.aarch64pigsty471.4 KiBpglinter_17-1.1.1-1PIGSTY.el9.aarch64.rpm
pglinter_171.1.1el10.x86_64pigsty592.6 KiBpglinter_17-1.1.1-1PIGSTY.el10.x86_64.rpm
pglinter_171.1.1el10.aarch64pigsty471.0 KiBpglinter_17-1.1.1-1PIGSTY.el10.aarch64.rpm
postgresql-17-pglinter1.1.1d12.x86_64pigsty487.8 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~bookworm_amd64.deb
postgresql-17-pglinter1.1.1d12.aarch64pigsty358.9 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~bookworm_arm64.deb
postgresql-17-pglinter1.1.1d13.x86_64pigsty487.6 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~trixie_amd64.deb
postgresql-17-pglinter1.1.1d13.aarch64pigsty358.8 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~trixie_arm64.deb
postgresql-17-pglinter1.1.1u22.x86_64pigsty540.7 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~jammy_amd64.deb
postgresql-17-pglinter1.1.1u22.aarch64pigsty417.9 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~jammy_arm64.deb
postgresql-17-pglinter1.1.1u24.x86_64pigsty535.7 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~noble_amd64.deb
postgresql-17-pglinter1.1.1u24.aarch64pigsty412.4 KiBpostgresql-17-pglinter_1.1.1-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
pglinter_161.1.1el8.x86_64pigsty578.5 KiBpglinter_16-1.1.1-1PIGSTY.el8.x86_64.rpm
pglinter_161.1.1el8.aarch64pigsty441.3 KiBpglinter_16-1.1.1-1PIGSTY.el8.aarch64.rpm
pglinter_161.1.1el9.x86_64pigsty593.0 KiBpglinter_16-1.1.1-1PIGSTY.el9.x86_64.rpm
pglinter_161.1.1el9.aarch64pigsty469.3 KiBpglinter_16-1.1.1-1PIGSTY.el9.aarch64.rpm
pglinter_161.1.1el10.x86_64pigsty593.2 KiBpglinter_16-1.1.1-1PIGSTY.el10.x86_64.rpm
pglinter_161.1.1el10.aarch64pigsty469.8 KiBpglinter_16-1.1.1-1PIGSTY.el10.aarch64.rpm
postgresql-16-pglinter1.1.1d12.x86_64pigsty487.7 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~bookworm_amd64.deb
postgresql-16-pglinter1.1.1d12.aarch64pigsty357.8 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~bookworm_arm64.deb
postgresql-16-pglinter1.1.1d13.x86_64pigsty487.4 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~trixie_amd64.deb
postgresql-16-pglinter1.1.1d13.aarch64pigsty358.0 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~trixie_arm64.deb
postgresql-16-pglinter1.1.1u22.x86_64pigsty540.5 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~jammy_amd64.deb
postgresql-16-pglinter1.1.1u22.aarch64pigsty416.6 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~jammy_arm64.deb
postgresql-16-pglinter1.1.1u24.x86_64pigsty535.6 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~noble_amd64.deb
postgresql-16-pglinter1.1.1u24.aarch64pigsty411.3 KiBpostgresql-16-pglinter_1.1.1-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
pglinter_151.1.1el8.x86_64pigsty578.7 KiBpglinter_15-1.1.1-1PIGSTY.el8.x86_64.rpm
pglinter_151.1.1el8.aarch64pigsty441.3 KiBpglinter_15-1.1.1-1PIGSTY.el8.aarch64.rpm
pglinter_151.1.1el9.x86_64pigsty592.6 KiBpglinter_15-1.1.1-1PIGSTY.el9.x86_64.rpm
pglinter_151.1.1el9.aarch64pigsty469.5 KiBpglinter_15-1.1.1-1PIGSTY.el9.aarch64.rpm
pglinter_151.1.1el10.x86_64pigsty592.3 KiBpglinter_15-1.1.1-1PIGSTY.el10.x86_64.rpm
pglinter_151.1.1el10.aarch64pigsty469.7 KiBpglinter_15-1.1.1-1PIGSTY.el10.aarch64.rpm
postgresql-15-pglinter1.1.1d12.x86_64pigsty487.7 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~bookworm_amd64.deb
postgresql-15-pglinter1.1.1d12.aarch64pigsty357.9 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~bookworm_arm64.deb
postgresql-15-pglinter1.1.1d13.x86_64pigsty487.3 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~trixie_amd64.deb
postgresql-15-pglinter1.1.1d13.aarch64pigsty357.6 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~trixie_arm64.deb
postgresql-15-pglinter1.1.1u22.x86_64pigsty540.6 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~jammy_amd64.deb
postgresql-15-pglinter1.1.1u22.aarch64pigsty416.2 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~jammy_arm64.deb
postgresql-15-pglinter1.1.1u24.x86_64pigsty535.6 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~noble_amd64.deb
postgresql-15-pglinter1.1.1u24.aarch64pigsty410.9 KiBpostgresql-15-pglinter_1.1.1-1PIGSTY~noble_arm64.deb
PackageVersionOSORGSIZEFile URL
pglinter_141.1.1el8.x86_64pigsty578.4 KiBpglinter_14-1.1.1-1PIGSTY.el8.x86_64.rpm
pglinter_141.1.1el8.aarch64pigsty441.6 KiBpglinter_14-1.1.1-1PIGSTY.el8.aarch64.rpm
pglinter_141.1.1el9.x86_64pigsty592.1 KiBpglinter_14-1.1.1-1PIGSTY.el9.x86_64.rpm
pglinter_141.1.1el9.aarch64pigsty469.5 KiBpglinter_14-1.1.1-1PIGSTY.el9.aarch64.rpm
pglinter_141.1.1el10.x86_64pigsty592.0 KiBpglinter_14-1.1.1-1PIGSTY.el10.x86_64.rpm
pglinter_141.1.1el10.aarch64pigsty469.7 KiBpglinter_14-1.1.1-1PIGSTY.el10.aarch64.rpm
postgresql-14-pglinter1.1.1d12.x86_64pigsty488.2 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~bookworm_amd64.deb
postgresql-14-pglinter1.1.1d12.aarch64pigsty358.0 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~bookworm_arm64.deb
postgresql-14-pglinter1.1.1d13.x86_64pigsty487.9 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~trixie_amd64.deb
postgresql-14-pglinter1.1.1d13.aarch64pigsty357.9 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~trixie_arm64.deb
postgresql-14-pglinter1.1.1u22.x86_64pigsty540.5 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~jammy_amd64.deb
postgresql-14-pglinter1.1.1u22.aarch64pigsty416.2 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~jammy_arm64.deb
postgresql-14-pglinter1.1.1u24.x86_64pigsty535.5 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~noble_amd64.deb
postgresql-14-pglinter1.1.1u24.aarch64pigsty411.3 KiBpostgresql-14-pglinter_1.1.1-1PIGSTY~noble_arm64.deb

Source

pig build pkg pglinter;		# 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 pglinter;		# install via package name, for the active PG version

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

Create this extension with:

CREATE EXTENSION pglinter;

Usage

pglinter: PostgreSQL Linting and Analysis Extension

pglinter analyzes your database for potential issues, performance problems, and best practice violations. It outputs results in SARIF 2.1.0 format.

Run Checks

SELECT pglinter.check();                                -- Run all enabled rules
SELECT pglinter.check_rule('B001');                     -- Run a specific rule
SELECT pglinter.check('/path/to/results.sarif');        -- Save SARIF report to file
SELECT pglinter.check_rule('B001', '/path/to/b001.sarif');

Rule Management

SELECT pglinter.show_rules();                -- Show all rules and their status
SELECT pglinter.explain_rule('B001');        -- Get rule details and suggested fixes
SELECT pglinter.enable_rule('B001');         -- Enable a specific rule
SELECT pglinter.disable_rule('B001');        -- Disable a specific rule
SELECT pglinter.is_rule_enabled('B001');     -- Check if a rule is enabled
SELECT pglinter.enable_all_rules();
SELECT pglinter.disable_all_rules();

Rule Configuration

SELECT pglinter.update_rule_levels('B001', 30, 70);   -- Set warning/error thresholds
SELECT pglinter.get_rule_levels('B001');               -- Get current thresholds
SELECT pglinter.export_rules_to_yaml();                -- Export rules to YAML
SELECT pglinter.import_rules_from_yaml('yaml...');     -- Import rules from YAML

Available Rules

Base (B-series): B001 tables without PK, B002 redundant indexes, B003 missing FK indexes, B004 unused indexes, B005 uppercase names, B006 unused tables, B007 cross-schema FKs, B008 FK type mismatches, B009 shared trigger functions, B010 reserved keywords, B011 multiple owners per schema.

Cluster (C-series): C002 insecure pg_hba.conf entries, C003 MD5 password encryption.

Schema (S-series): S001 no default role grants, S002 env prefixes/suffixes, S003 unsecured public schema, S004 system role ownership, S005 multiple owners per schema.

Last updated on