Owing to growing popularity of PostgreSQL, more and more cloud providers have started offering their Database as a Service (DaaS) platform around PostgreSQL. What user gets is a fully managed, ready-to-use Database service.

Microsoft Azure cloud announced their PostgreSQL as a service in May 2017.

Disclaimer: This post is a purely personal view based on first attempt to explore the offering.

Creating a new account in Azure cloud

A free trial offer is available in Azure cloud portal. Experience with signing up for a new account was not that smooth. Figured it was the right time to see how the support works. I went ahead and created a support request. It was a pleasant surprise to get a direct call on my mobile from Microsoft almost immediately, even though I am not a “paying” customer and just looking for “free account” to try.

Logging into Azure Portal

Azure Portal is the central console for all Azure services. Concept wise it is similar to Amazon’s AWS console. It is accessible from URL https://portal.azure.com. While accessing this, we get redirected for authentication and returns to the same portal console after authentication. Console is equipped with a dashboard and left side menu items.

Launching first Postgres instance in Azure cloud

Azure provided a “+ New” button on the top of the left menu to launch azure services. On opting this menu item, it will give a sub-menu with all the services. “Azure Database for Postgres” is available under “Databases” menu item. currently it is marked as “PREVIEW”.

It presents a vertical form to fill the details of desired database instance which you may want to create. Currently PostgreSQL 9.6 and 9.5 are available to select.And Microsoft provides PostgreSQL across different datacenters.

Instance copacity is decided by the pricing tiers. Currently Basic and Standard pricing tiers are available. Premium is marked as “coming soon”

Microsoft measures the instance capacity in a unit called “Compute Units”. This documentation explains what a compute unit means for postgreSQL instance and how to start with. Detailed pricing information is available here

Then click on “Pin to dashboard” and click on “Create” button to provision the server. Provisioning can take up to 20 minutes.

There is indication in notification icon on the top bar. Status change notifications will be available at notification section. Upon completion of instance creation, full details and options for that instance will be displayed.

firewall rules

There is an option for setting firewall rules to control which IPs are allowed to access the PostgreSQL instance. Always i prefer to specify very strict rules. The IP specified can be an another Azure server or Public IP of our on-premise setup.


In order remove any confusion aroud the application connectivity, Azure provides ready to copy-paste connection strings from console This can be of great help for developers to easily connect and the non-cryptic instance name are a great thing for Operations teams. I am able to connect from my on-premise machine to PostgreSQL instance in Azure like:

psql -h jobintrial.postgres.database.azure.com -U masteruser@jobintrial -d postgres

Connectivity from cloud shell.

Azure provides an additional feature called “Cloud Shell” which is accessible from the top menu bar. It is a shell running on Azure cloud (running remotely) but accessible though web browser. It can be either Bash or Powershell. But the catch here is that Azure Cloud Shell requires an Azure file share to persist files. So we need to subscribe to Azure storage.

Important : for any type of connectivity, firewall rules should explicitly allow the connection from IP.

In nutshell

I found some hiccups in Azure account creation. But the Azure support was excellent and support person followed up with me until I said everything is OK. That was more than expected. At the first experience level everything looks smooth. I shall explore more in coming days and share. Hopefully soon PostgreSQL offering will mature and move from “PREVIEW” status.