Closes #37 ## Summary Adds an Azure reference for recovering a **deleted** Azure Database for PostgreSQL Flexible Server. Until now that question routed to the HA/DR reference, whose PITR guidance assumes the source server still exists. ## What's in the reference - **Recovery window:** backups are kept for 5 days after deletion. Recovery is best-effort, in the same subscription and original region only. - **Procedure:** - Look up the `resourceId` and `submissionTimestamp` of the delete event in the activity log. - Call `Servers - Create Or Update` with `createMode: "ReviveDropped"` and api-version `2025-08-01`, via `az rest`. There's no dedicated `az postgres flexible-server` subcommand for this. - Prefer a new server name. - The revive request needs user confirmation because it creates a billable server. - **VNet-integrated servers:** the request also needs `network.delegatedSubnetResourceId` and `network.privateDnsZoneArmResourceId`. - **After the 5-day window:** restore from an Azure Backup vault if long-term retention (LTR) was configured. The vault restores dump files to a storage account, which you then load with `pg_restore`. - **Post-restore checklist** for the new server. - **Prevention:** a `CanNotDelete` lock. Locks don't block `DROP DATABASE`. - **HorizonDB:** deleted clusters can't be restored; recommend a Delete lock. ## Other changes - **Routing:** new row in `SKILL.md`, plus an entry in `tests/.skills.json`. - **Token budget:** `SKILL.md` was already at 3,991 of 4,000 tokens. I compacted some wording (graph-workloads paragraph, a duplicate graph bullet, one CLI-policy sentence) without removing any routing rules. It's now exactly 4,000. - **Tests:** - 3 activation-precision cases, including a gating negative. - 4 routing challenges (`route-del-01..03`, `route-hz-12`). - 5 eval challenges (`az-del-01..04`, `hz-del-01`). - **Docs:** README catalog and counts, CONTRIBUTING counts, CHANGELOG. ## Validation - `python -m pytest tests -m "not pg and not integration and not azure"`: 187 passed. - `tests/evals/routing_eval.py --check`: PASS. All new challenges route correctly on copilot-cli, claude-code and codex-cli. - `tests/evals/lint_challenges.py`: 331 challenges, no schema issues. ## Sources - [Restore a deleted server](https://learn.microsoft.com/azure/postgresql/backup-restore/how-to-restore-deleted-server) - [Servers - Create Or Update (2025-08-01)](https://learn.microsoft.com/rest/api/postgresql/servers/create-or-update?view=rest-postgresql-2025-08-01) - [Resource locks](https://learn.microsoft.com/azure/postgresql/configure-maintain/how-to-enable-deletion-protection) - [HorizonDB business continuity](https://learn.microsoft.com/azure/horizondb/backup-restore/concepts-business-continuity) --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
postgres-skills plugin
The installable plugin payload for the postgres-skills marketplace. It bundles
the PostgreSQL skill and the postgres-mcp MCP server so AI-agent CLIs (GitHub Copilot CLI,
Claude Code, Codex) can route PostgreSQL work to the right guidance and tools.
Contents
| Path | Purpose |
|---|---|
skills/postgresql-best-practices/ |
The skill (SKILL.md routing table + reference docs). |
plugin.json |
Agent Plugins v1.0 manifest used by GitHub Copilot. |
mcp.json |
Agent Plugins v1.0 declaration for the postgres-mcp server. |
.mcp.json |
Declares the postgres-mcp MCP server (local stdio through npx, with optional telemetry disabled). |
SETUP.md |
Connection, permissions, data-access, privacy, and removal guidance. |
.claude-plugin/plugin.json |
Plugin identity and display metadata for Claude Code. |
.codex-plugin/plugin.json |
Plugin manifest required by Codex. |
Plugin manifests
Codex requires a manifest at .codex-plugin/plugin.json inside the plugin folder.
Without it, codex plugin add postgres-skills@postgres-skills fails with
Error: missing plugin.json.
Claude Code reads plugin metadata from .claude-plugin/plugin.json. GitHub
Copilot reads the Agent Plugins v1.0 plugin.json and mcp.json files at
the plugin root. Keep the host manifests and marketplace metadata in
.github/plugin/marketplace.json at the same release version.
Security and privacy
The plugin launches
@microsoft/postgres-mcp locally
through npx. It can read from and write to the database permitted by the
selected PostgreSQL role, and its CSV tools can read explicitly approved local
paths. Database information returned by the MCP server becomes part of the
user's AI-assistant interaction.
The bundled configuration disables postgres-mcp telemetry. Use a dedicated, least-privilege role and a read-only profile for exploration. The skills require confirmation before database writes, file imports, graph writes, or Azure resource changes. See SETUP.md for the complete access and data-use disclosure.