azure-postgres by microsoft/github-copilot-for-azure
npx skills add https://github.com/microsoft/github-copilot-for-azure --skill azure-postgres为现有的 Azure Database for PostgreSQL 灵活服务器配置基于 Microsoft Entra ID 的无密码身份验证。此技能侧重于设置 Entra ID 身份验证、管理用户访问以及从基于密码的身份验证迁移。
主要使用场景:
启用 Azure MCP 时,使用以下工具进行 PostgreSQL 操作:
azure__postgres 配合命令 postgres_server_list - 列出 PostgreSQL 服务器azure__postgres 配合命令 postgres_database_list - 列出服务器上的数据库azure__postgres 配合命令 postgres_database_query - 执行 SQL 查询广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
azure__postgres 配合命令 postgres_server_param_get - 获取服务器参数azure__postgres 配合命令 postgres_server_param_set - 设置服务器参数az postgres flexible-server list --output table
az postgres flexible-server db list --server-name SERVER -g RG
az postgres flexible-server show --name SERVER -g RG
az postgres flexible-server create --name SERVER -g RG --location REGION --admin-user ADMIN --version 16
| 属性 | 值 |
|---|---|
| CLI 前缀 | az postgres flexible-server |
| MCP 工具 | azure__postgres |
| 最佳适用场景 | 关系型数据、PostgreSQL 兼容性、PostGIS |
| 引擎版本 | PostgreSQL 11, 12, 13, 14, 15, 16(推荐) |
此技能主要侧重于为现有的 PostgreSQL 服务器配置身份验证。如果您需要引用或创建服务器,请使用 MCP 工具或 CLI 命令,并提供 Azure 门户链接以便于访问。
门户链接格式:
https://portal.azure.com/#@{tenant-domain}/resource/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{server-name}/overview
门户链接示例:
在 Azure 门户中查看:
https://portal.azure.com/#resource/subscriptions/abc123.../resourceGroups/myrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/myserver/overview
⚠️ 对于生产工作负载,请始终使用基于 Entra ID 的无密码身份验证。
本指南涵盖:
根据您的场景使用以下模式:
| 层级 | vCore 数 | 内存 | 使用场景 |
|---|---|---|---|
| 可突增 | 1-20 | 0.5-4 GB/vCore | 开发/测试,低流量 |
| 常规用途 | 2-64 | 4 GB/vCore | 大多数生产工作负载 |
| 内存优化 | 2-64 | 8 GB/vCore | 高内存工作负载 |
开发/测试请从可突增层级开始,根据需要扩展。
| 问题 | 原因 | 解决方案 |
|---|---|---|
role does not exist | 数据库中未创建角色 | 运行 pgaadauth_create_principal - 参见指南 |
password authentication failed | 令牌已过期(有效期 5-60 分钟) | 获取新令牌:az account get-access-token --resource-type oss-rdbms |
permission denied | 角色缺少权限 | 运行 GRANT 语句 - 参见模板 |
| 连接超时 | 防火墙阻止访问 | 添加防火墙规则:az postgres flexible-server firewall-rule create |
| 来宾用户登录失败 | UPN 格式错误 | 使用 Azure AD 中带 #EXT# 标签的完整 UPN |
每周安装量
34.8K
代码仓库
GitHub 星标数
171
首次出现
2026年2月4日
安全审计
安装于
github-copilot34.7K
codex50
gemini-cli48
opencode45
amp42
kimi-cli42
Configure passwordless authentication with Microsoft Entra ID for existing Azure Database for PostgreSQL Flexible Server. This skill focuses on setting up Entra ID authentication, managing user access, and migrating from password-based authentication.
Primary use cases:
When Azure MCP is enabled, use these tools for PostgreSQL operations:
azure__postgres with command postgres_server_list - List PostgreSQL serversazure__postgres with command postgres_database_list - List databases on a serverazure__postgres with command postgres_database_query - Execute SQL queriesazure__postgres with command postgres_server_param_get - Get server parametersazure__postgres with command postgres_server_param_set - Set server parametersaz postgres flexible-server list --output table
az postgres flexible-server db list --server-name SERVER -g RG
az postgres flexible-server show --name SERVER -g RG
az postgres flexible-server create --name SERVER -g RG --location REGION --admin-user ADMIN --version 16
| Property | Value |
|---|---|
| CLI prefix | az postgres flexible-server |
| MCP tools | azure__postgres |
| Best for | Relational data, PostgreSQL compatibility, PostGIS |
| Engine versions | PostgreSQL 11, 12, 13, 14, 15, 16 (recommended) |
This skill primarily focuses on configuring authentication for existing PostgreSQL servers. If you need to reference or create servers, use MCP tools or CLI commands, and provide Azure Portal links for easy access.
Portal Link Format:
https://portal.azure.com/#@{tenant-domain}/resource/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{server-name}/overview
Example portal link:
View in Azure Portal:
https://portal.azure.com/#resource/subscriptions/abc123.../resourceGroups/myrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/myserver/overview
⚠️ ALWAYS use passwordless authentication with Entra ID for production workloads.
→ Microsoft Entra ID Authentication Setup Guide
This guide covers:
Use these patterns based on your scenario:
| Scenario | Guide Link | Use When |
|---|---|---|
| Developer Access | Pattern 1 | Grant developers access with their Azure identity |
| App Authentication | Pattern 2 | Passwordless access for Azure-hosted apps (Container Apps, App Service, Functions) |
| Team Access | Pattern 3 | Manage permissions via Azure AD groups |
| Connection Issues | Troubleshooting | Diagnose authentication and connection failures |
| Migration |
| Tier | vCores | Memory | Use Case |
|---|---|---|---|
| Burstable | 1-20 | 0.5-4 GB/vCore | Dev/test, low traffic |
| General Purpose | 2-64 | 4 GB/vCore | Most production workloads |
| Memory Optimized | 2-64 | 8 GB/vCore | High-memory workloads |
Start with Burstable for dev/test, scale up as needed.
| Issue | Cause | Solution |
|---|---|---|
role does not exist | Role not created in database | Run pgaadauth_create_principal - see guide |
password authentication failed | Token expired (5-60 min validity) | Get fresh token: az account get-access-token --resource-type oss-rdbms |
permission denied | Role lacks permissions | Run GRANT statements - |
Weekly Installs
34.8K
Repository
GitHub Stars
171
First Seen
Feb 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot34.7K
codex50
gemini-cli48
opencode45
amp42
kimi-cli42
Supabase Postgres 最佳实践指南 - 8大类别性能优化规则与SQL示例
62,800 周安装
| Pattern 5 |
| Transition from password to Entra ID authentication |
| Connection timeout | Firewall blocking access | Add firewall rule: az postgres flexible-server firewall-rule create |
| Guest user login fails | Wrong UPN format | Use full UPN with #EXT# tag from Azure AD |