pg_circuit
pg_circuit : Runtime observation, warnings and blocking for dangerous SQL statements
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5815 | pg_circuit | pg_circuit | 0.1.0 |
ADMIN | Apache-2.0 | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-- | No | Yes | Yes | Yes | no | no |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.0 |
18 17 16 15 14 | pg_circuit |
- |
| RPM | PIGSTY | 0.1.0 |
18 17 16 15 14 | pg_circuit_$v |
- |
| DEB | PIGSTY | 0.1.0 |
18 17 16 15 14 | postgresql-$v-pg-circuit |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| el8.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| el9.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| el9.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| el10.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| el10.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| d12.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| d12.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| d13.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| d13.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| u22.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| u22.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| u24.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| u24.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| u26.x86_64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
| u26.aarch64 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | PIGSTY 0.1.0 | N/A | N/A |
Source
github.com/PG-Circuit/pg-circuit
pg_circuit-0.1.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
Sources:
pg_circuit inspects potentially dangerous DML and DDL on PostgreSQL 16–18. The Community edition can observe, warn or block statements. Add it to shared_preload_libraries, restart PostgreSQL, then create the extension as a superuser.
Basic protection
Configuration and diagnostics
pg_circuit.mode defaults to warn; observe collects risk without warnings, and enforce blocks scores at or above the configured threshold. pg_circuit_runtime_state() reports pressure signals and pg_circuit_events() exposes recent events.
Community always reports effective runtime mode NORMAL. Pressure readings do not automatically escalate enforcement. This is a policy aid; application transactions, authorization and backups still determine data protection. Review rules and thresholds on representative queries before enabling enforcement.