# pg_create_partition

Create a partition. Use subpartitionBy/subpartitionKey to make it sub-partitionable for multi-level partitioning.

Agent View of the PolicyLayer registry record for `pg_create_partition`. HTML page: https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-create-partition

## Facts

- Tool: `pg_create_partition`
- Server: PostgreSQL MCP Server (`@neverinfamous/postgres-mcp`) — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp.md
- Install: `npx -y @neverinfamous/postgres-mcp`
- Homepage: https://github.com/neverinfamous/postgresql-mcp.git
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pg_create_partition",
    "arguments": {}
  }
}
```

## Why pg_create_partition is rated Medium

Creating a partition modifies database schema and structure, which is reversible (partitions can be detached or dropped), making this a Write operation rather than Destructive. However, the high severity reflects that improper partitioning of large tables can cause significant performance degradation, lock tables during the operation, and require careful planning to undo.

From the tool's own definition: "Tool description states 'Create a partition' which creates a new persistent database structure. The tool creates partitioning schemes that modify database schema and organization."

## Use case

AI agents use pg_create_partition to create or update resources in PostgreSQL MCP Server, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your PostgreSQL MCP Server environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches PostgreSQL MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "pg_create_partition": {
      "limits": [
        {
          "counter": "pg_create_partition_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on PostgreSQL MCP Server (273)

- `pg_cascade_simulator` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cascade-simulator.md
- `pg_cron_cleanup_history` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cron-cleanup-history.md
- `pg_cron_unschedule` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cron-unschedule.md
- `pg_detach_partition` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-detach-partition.md
- `pg_doc_drop_collection` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-doc-drop-collection.md
- `pg_doc_remove` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-doc-remove.md
- `pg_drop_index` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-drop-index.md
- `pg_drop_schema` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-drop-schema.md
- `pg_drop_sequence` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-drop-sequence.md
- `pg_drop_table` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-drop-table.md
- `pg_drop_view` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-drop-view.md
- `pg_kcache_reset` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-kcache-reset.md
- `pg_migration_rollback` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-migration-rollback.md
- `pg_partman_set_retention` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-partman-set-retention.md
- `pg_reset_stats` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-reset-stats.md
- `pg_role_drop` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-role-drop.md
- `pg_text_normalize` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-text-normalize.md
- `pg_truncate` — Destructive — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-truncate.md
- `pg_analyze` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-analyze.md
- `pg_analyze_query_indexes` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-analyze-query-indexes.md
- `pg_buffer` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-buffer.md
- `pg_cancel_backend` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cancel-backend.md
- `pg_cluster` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cluster.md
- `pg_cron_create_extension` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cron-create-extension.md
- `pg_cron_schedule` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cron-schedule.md
- `pg_cron_schedule_in_database` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-cron-schedule-in-database.md
- `pg_explain_analyze` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-explain-analyze.md
- `pg_geo_cluster` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-geo-cluster.md
- `pg_geo_transform` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-geo-transform.md
- `pg_geometry_transform` — Execute — https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp/pg-geometry-transform.md
- …and 243 more: https://policylayer.com/tools/io-github-neverinfamous-postgres-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-neverinfamous-postgres-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-neverinfamous-postgres-mcp
