pg_licht

•
11
•

Inspect PostgreSQL schemas, execution plans, locks, replication, and PgBouncer metrics securely without exposing table rows or permitting write operations.

pg_licht is a read-only Model Context Protocol server built in C++ that allows AI assistants to safely inspect and diagnose PostgreSQL databases. By reading strictly from system catalogs, statistics views, and PgBouncer admin consoles, it delivers essential structural and performance metrics while ensuring table rows are never retrieved and write operations are strictly blocked. Every query runs in an isolated READ ONLY transaction protected by strict statement timeouts and parameterization. Designed for fleet-wide visibility, pg_licht allows operators and AI models to explore schemas, evaluate hypothetical indexes using HypoPG, triage disk or lock contention, and monitor connection pools with zero risk of data mutation or row-level leakage.

주요 기능

01Strict read-only safety with parameterized catalog queries and transaction-scoped timeouts
02Fleet-wide management supporting multi-database and replica fan-out sweeps up to 16 concurrent nodes
03PgBouncer integration providing live metrics on pool size, connection wait times, and client states
04Built-in diagnostic prompts for slow queries, lock contention, deadlocks, disk space, and schema changes
0511 GitHub stars
06Complete row-level data privacy by reading solely from catalogs, plans, and system statistics

사용 사례

01Troubleshooting slow queries and deadlocks using catalog statistics and safe EXPLAIN plans
02Assessing schema migration risks and index impacts using HypoPG without altering production data
03Investigating urgent operational incidents such as pool exhaustion, disk bloat, or replica lag