Azure Database for PostgreSQL Reference
Azure CLI Reference
Commands and parameters for managing Azure Database for PostgreSQL using the Azure CLI.
az postgres server
Manage PostgreSQL servers.
az postgres server --help
az postgres server create
Create a PostgreSQL server.
az postgres server create --resource-group <resource-group-name> --name <server-name> --admin-user <user> --admin-password <password> --sku <sku-name> --location <location>
See full CLI command reference for more details.
Azure PowerShell Reference
Cmdlets and parameters for managing Azure Database for PostgreSQL using Azure PowerShell.
New-AzPostgreSqlFlexibleServer
Creates a new flexible server for Azure Database for PostgreSQL.
New-AzPostgreSqlFlexibleServer -ResourceGroupName "MyResourceGroup" -Name "myflexibleserver" -Location "eastus" -AdministratorLogin "pgadmin" -AdministratorLoginPassword "MyPassword123" -Sku `
-Name "Standard_D2s_v3" -Tier "GeneralPurpose" -Capacity 2 -Family "Dsv3" -Size "Standard_D2s_v3"
See full PowerShell cmdlet reference for more details.
REST API Reference
Endpoints and request/response structures for interacting with Azure Database for PostgreSQL via the REST API.
Servers - Create
Creates a new server.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}?api-version=2017-12-01
Request Body Example:
{
"location": "eastus",
"properties": {
"administratorLogin": "pgadmin",
"administratorLoginPassword": "MyPassword123",
"version": "11",
"sslEnforcement": "Enabled",
"storageProfile": {
"storageMB": 51200,
"storageAutoGrow": "Enabled",
"backupRetentionDays": 7
},
"sku": {
"name": "GP_Gen5_2",
"tier": "GeneralPurpose",
"capacity": 2,
"family": "Gen5"
}
}
}
See full REST API documentation for more details.
SDK References
Links to SDK documentation for various programming languages.
Supported SQL Functions
Details on PostgreSQL functions and features supported by Azure Database for PostgreSQL.
Azure Database for PostgreSQL - Single Server supports PostgreSQL 9.6, 10, 11, and 12.
Azure Database for PostgreSQL - Flexible Server supports PostgreSQL 11, 12, 13, 14, and 15.
Check the specific version documentation for a comprehensive list of supported functions and extensions.
See PostgreSQL documentation for detailed function information.
Server Configuration Settings
List of configurable parameters for Azure Database for PostgreSQL servers.
Commonly Used Parameters:
max_connections: Maximum number of concurrent connections.shared_buffers: Amount of memory used for caching data.work_mem: Memory used for internal sort operations and hash tables.maintenance_work_mem: Memory used for vacuuming and other maintenance operations.log_statement: Specifies which SQL statements to log.
See server parameters documentation for a full list and details.
Error Codes and Messages
Common error codes and troubleshooting guidance for Azure Database for PostgreSQL.
Example Errors:
- Error Code 50001: Connection failed. Check firewall rules and network connectivity.
- Error Code 50002: Authentication failed. Verify username and password.
- Error Code 50003: Insufficient resources. Consider upgrading your tier or scaling up.
Refer to the troubleshooting guide for more specific error resolution.