Loading...
Loading...
PostgreSQL & Azure Database for PostgreSQL: connect, query, tables, index, JSONB, partition, RLS, FTS, pooling, replication, restart, upgrade, scale, backup, Entra auth.
npx skill4agent add microsoft/postgres-skills postgresql-best-practicesALTER SYSTEMSUPERUSERazure_pg_adminCONCURRENTLYCREATE INDEXREINDEXDETACH PARTITIONpostgres_mcp_modifypostgres_mcp_modifypostgres_mcp_bulk_load_csvMERGEjson_tableDETACH CONCURRENTLYpg_hba.confpostgresql.conf/var/lib/postgresql/SHOW config_fileSHOW hba_fileSHOW data_directorysystemctlsudopg_ctlinitdbRestart-Serviceservices.mscbrew servicesdocker restartaz postgres flexible-server parameter setaz horizondbaz postgres flexible-server parameter setwork_memshared_buffersmax_connectionsALTER DATABASE SETaz postgres flexible-server replica createpg_dumppg_basebackuppg_dumpaz horizondbMicrosoft.HorizonDB2026-01-20-previewaz postgres flexible-serverazure-*az version
az account show --query "{subscription:id, name:name, tenant:tenantId, user:user.name}" -o jsonaz account showaz loginaz login --use-device-codeaz--subscription <id>az postgres flexible-server list --query "[].{name:name, resourceGroup:resourceGroup, location:location, version:version}" -o tablepostgres_mcp_get_server_capabilitiesisAzurepostgres-mcpisAzure: trueazure-postgresql-*isAzure: falsepostgresql-*postgresql-*isAzureisAzure: trueazureFlavor*.horizondb.azure.com*.postgres.database.azure.comazure-*az postgres flexible-server| Keyword triggers | Reference | When to use |
|---|---|---|
| pgvector, vector column, HNSW index, embedding store, similarity search, cosine distance, vector index, nearest neighbor, pgvector extension | postgresql-vector-search | pgvector setup, HNSW indexes, distance operators, recall tuning |
| RAG, embeddings postgresql, semantic search pgvector, hybrid search RRF, reciprocal rank fusion, vector + full text, retrieval augmented, RAG system | postgresql-genai-rag | RAG pipelines, hybrid search with RRF, chunking strategy |
| CREATE EXTENSION, pg_stat_statements, pg_trgm, shared_preload_libraries, manage extensions, extension install, install extension, install the | postgresql-extensions | Extension install/upgrade, common extensions, troubleshooting |
| btree index, gin index, gist index, brin index, partial index, covering index, CREATE INDEX, multicolumn index, index bloat, index strategy | postgresql-advanced-indexing | B-tree, GIN, GiST, BRIN, partial/expression/covering indexes |
| jsonb, json containment, GIN jsonb_ops, jsonb_path_query, document store postgresql, jsonb index, -> operator, ->> operator | postgresql-jsonb-patterns | JSONB operators, indexing strategies, query patterns |
| table partition, range partition, list partition, hash partition, pg_partman, partition pruning, detach partition, 500M rows, large table time-series, detach a partition | postgresql-table-partitioning | Declarative partitioning, partition pruning, maintenance |
| row level security, RLS policy, tenant isolation, CREATE POLICY, FORCE ROW LEVEL SECURITY, multi-tenant, enabled RLS | postgresql-row-level-security | CREATE POLICY, per-tenant isolation, session variables |
| tsvector, tsquery, full text search, ts_rank, websearch_to_tsquery, text search configuration, search functionality, autocomplete search, autocomplete, prefix search | postgresql-full-text-search | tsvector/tsquery, GIN indexes, ranking, hybrid search |
| connection pool, max_connections, too many clients, too many connections, idle connections, PgBouncer, connection exhaustion | postgresql-connection-management | Pool sizing, PgBouncer modes, connection lifetime |
| logical replication, publication, subscription, CDC postgres, pg_logical, wal_level logical, replicate tables, replication slot, WAL filling, replicate specific tables | postgresql-replication | Logical replication setup, row filters (PG15+), conflict resolution |
| slow query, EXPLAIN ANALYZE, query plan, work_mem tuning, vacuum analyze, autovacuum tuning, query performance | postgresql-query-performance | EXPLAIN reading, statistics tuning, vacuum, parallel query |
isAzure: trueGATE: Only when, or an explicit Azure question (see Connection Context Detection rule 6).isAzure: true
| Keyword triggers | Reference | When to use INSTEAD OF generic |
|---|---|---|
| DiskANN, pg_diskann, filtered vector search, azure vector index tuning, vector search azure, HNSW indexes azure | azure-postgresql-vector-diskann | User needs DiskANN (Azure-only), filtered vector search, or is on Azure and needs index advice |
| azure_ai, azure_openai, ai.complete, in-database embeddings, LLM from SQL, generate embeddings SQL, call AI from SQL, connect azure openai, AI functions from SQL, classify using AI, AI directly in SQL, call GPT from database, call OpenAI from SQL, invoke AI from postgres, run inference in database, ML in PostgreSQL azure, summarize text SQL, sentiment analysis SQL | azure-postgresql-azure-ai | User wants to call LLMs/embeddings directly from SQL (azure_ai extension) |
| azure_ai RAG, in-database RAG pipeline, azure_openai.create_embeddings + search, RAG azure_ai, embeddings without leaving database, batch-embed, RAG system, embed the user, entire RAG pipeline inside, generate embeddings for | azure-postgresql-genai-patterns | User wants end-to-end RAG using azure_ai (in-DB embeddings). If app-driven RAG on Azure, use generic |
| azure.extensions, allowlist, extension on Azure, azure_pg_admin, extension Flexible Server, install extension azure, permission denied extension azure, permission denied to create extension | azure-postgresql-extension-lifecycle | Extension install ON AZURE (allowlist workflow). Generic |
| Entra ID, managed identity, service principal, passwordless auth, AAD token, Entra ID postgres, token-based connection, token expir | azure-postgresql-entra-id-auth | Azure-specific auth only. No generic equivalent. |
| built-in PgBouncer, azure connection pooling, pool_mode azure Flexible Server, connection pooling azure | azure-postgresql-connection-pooling | Azure built-in PgBouncer. Generic |
| provision Flexible Server, az postgres create, resize azure postgres, Burstable, GeneralPurpose, MemoryOptimized, IOPS scaling, Terraform azure postgres, create azure postgres, create a new server, max_connections azure, scale down, scale storage, shrink storage, scale up, change tier, change SKU, increase compute, increase vCores, upgrade tier, server configuration, compute tier, storage tier, resize server, server sizing | azure-postgresql-provisioning | Azure-specific. No generic equivalent. |
| zone redundant HA, zone-redundant, failover azure, PITR, read replica azure, geo-restore, backup azure postgres, high availability azure postgres, same-zone HA | azure-postgresql-ha-disaster-recovery | Azure HA/DR. No generic equivalent. |
| deleted server, deleted my server, deleted Flexible Server, deleted my Flexible Server, server was deleted, cluster was deleted, deleted Azure PostgreSQL server, deleted my Azure HorizonDB, deleted HorizonDB, accidentally deleted, restore my deleted server, recover deleted server, restore deleted, undelete, ReviveDropped, delete lock, deletion protection, CanNotDelete | azure-postgresql-restore-deleted-server | Deleted server/cluster, delete locks. Live server → HA/DR PITR |
| Private Link, VNet, firewall rule azure, SSL azure, TLS azure, public access azure, private endpoint postgres, network access azure, can't connect, connection refused azure, SSL connection is required, certificate verify failed, connection timeout azure, network connectivity azure, allow IP, whitelist IP | azure-postgresql-networking-ssl | Azure networking. No generic equivalent. |
| Query Store, index recommendations, performance insights, intelligent tuning, query performance azure, slow queries azure, indexes Azure PostgreSQL recommends | azure-postgresql-intelligent-tuning | Azure-specific monitoring. Generic |
| major version upgrade, maintenance window, in-place upgrade, MVU, upgrade postgres azure, schedule maintenance, upgrade my Azure PostgreSQL, upgrade from version | azure-postgresql-upgrades-maintenance | Azure-specific. No generic equivalent. |
isAzure: trueSELECT current_setting('azure.server_tier', true);SHOW azure.extensions;az ... parameter set --valueag_catalogag_catalog.cypher()azure-postgresql-vector-diskannpostgresql-vector-searchisAzure: trueazure-postgresql-genai-patternsazure_aipostgresql-genai-ragazure-postgresql-extension-lifecyclepostgresql-extensionsazure-postgresql-connection-poolingpostgresql-connection-managementazure-*isAzure: truepostgresql-*pg-graphSHOWpg_settingspg_available_extensions