Critical-risk tools in PostgreSQL MCP Server
18 of the 274 tools in PostgreSQL MCP Server are classified as critical risk. This page profiles those tools specifically, with recommended policy actions and the attack patterns that target them.
Every operation listed below is an action PolicyLayer recommends controlling at the transport layer. Open any tool to see the full profile, risk score, and YAML policy snippet.
Tools at critical risk
-
pg_cascade_simulatorDestructiveSimulate the impact of DELETE, DROP, or TRUNCATE on a table. Returns affected tables, estimated row counts, cascade paths, and severity assessment.
-
pg_cron_cleanup_historyDestructiveDelete old job run history records. Helps prevent the cron.job_run_details table from growing too large. By default, removes records older than 7 days.
-
pg_cron_unscheduleDestructiveRemove a scheduled cron job by its ID or name. If both are provided, jobName takes precedence. Job ID accepts numbers or numeric strings. Works for both active and inactive jobs.
-
pg_detach_partitionDestructiveDetach a partition. Use concurrently: true for non-blocking. Use finalize: true only after an interrupted CONCURRENTLY detach.
-
pg_doc_drop_collectionDestructiveDrop a document collection (table).
-
pg_doc_removeDestructiveRemove documents matching a filter from a collection.
-
pg_drop_indexDestructiveDrop an index from a table. Supports IF EXISTS, CASCADE, and CONCURRENTLY options.
-
pg_drop_schemaDestructiveDrop a schema (optionally with all objects).
-
pg_drop_sequenceDestructiveDrop a sequence. Supports IF EXISTS and CASCADE options.
-
pg_drop_tableDestructiveDrop a table from the database.
-
pg_drop_viewDestructiveDrop a view or materialized view. Supports IF EXISTS and CASCADE options.
-
pg_kcache_resetDestructiveReset pg_stat_kcache statistics. Use this to start fresh measurements. Note: This also resets pg_stat_statements statistics.
-
pg_migration_rollbackDestructiveRoll back a specific migration by ID or version.
-
pg_partman_set_retentionDestructiveConfigure retention policy for a partition set. Partitions older than the retention period will be dropped or detached during maintenance.
-
pg_reset_statsDestructiveReset statistics counters (requires superuser).
-
pg_role_dropDestructiveDrop a PostgreSQL role. Use ifExists (default: true) to skip gracefully if the role does not exist.
-
pg_text_normalizeDestructiveRemove accent marks (diacritics) from text using PostgreSQL unaccent extension. Note: Does NOT lowercase or trim—use LOWER()/TRIM() in a query for those operations.
-
pg_truncateDestructiveTruncate a table, removing all rows quickly. Use cascade to truncate dependent tables.
Attacks that target this class
Critical-risk tools in any server share these documented attack patterns. Each links to the full case and the defensive policy.