Cloud Hosting Options for PostgreSQL

decubitisannouncerData Management

Nov 27, 2012 (5 years and 5 months ago)


Cloud Hosting for PostgreSQL

Database Hosting Options


Dedicated Server

Virtual Machine

Database as a Service

Finding Your Just Right Hosting

Pssh, that's easy!

Just use EC2!


I could spin up dozens of databases on-

EC2 Caveats

See Christophe Pettus' PGCon 2012

PostgreSQL on AWS

Dedicated Instances
: base cost at least
$7300/month, plus per-instance costs

Don't trust (ephemeral) instance storage

Beware Regional and Internet Data Transfer
pricing, EBS storage and I/O costs

Does your database use actually fit EC2's
business and cost model?

Choosing a Hosting Provider

Three main factors to consider:




Beware “too good to be true” or “

Check how long they've been in business,
contact details, office location

Remember: moving your master database is
much trickier than moving a web server.


Number and speed of CPU cores

Memory, guaranteed vs.

Disk I/O

disk space

10/100/1000 Mbps, metered or unmetered

data center location

Virtualization method: OpenVZ, Virtuozzo,
Vserver, KVM, Xen, VMWare

No love for Postgres?

Hosting providers offer servers customized for:

Game servers


Storing backups

High bandwidth

High RAM


Don't trust your hosting provider to handle e.g.
VPS migrations without corruption

Heroku Postgres

database as a service”

Crane and Kappa offer great bang for the buck,

1TB max. database size on all offerings

Can't create global objects: stuck with single
default username per-database?

No database superuser

Can't setup replication outside of Heroku

VPS Toolkit

bwm-ng: watch out for excessive bandwidth
use, especially during backups

ioping: run for an hour, check max. latency:
--- /home/josh/ (simfs /dev/simfs) ioping statistics ---
1515 requests completed in 1550734.6 ms, 44 iops, 0.2 mb/s
min/avg/max/mdev = 0.1/22.9/4521.9/142.1 ms

Ensure performance is acceptable for your
most I/O intensive jobs: stats rollups, backups
and restores, CLUSTER, etc.

Don't forget the hosting provider's dashboard

Ain't gonna happen

Ain't gonna happen #2

Ain't gonna happen #3

Read those TOSs

You will not engage in any activity that
interferes with or disrupts services

DreamHost Web Hosting servers are not
intended as a data backup or archiving service.

We may suspend... if we determine... may
adversely impact the Service Offerings or the
systems or Content of any other AWS customer

Customers may not ... run any “jail-breaking”
software that circumvents the restrictions
placed on the container by the parent node.

Beware the budget VPS

Beware the Budget VPS #2

So basically, you've got a broken kernel here: it claimed to give PG circa 135MB of memory, but
what's actually there is only about 128MB. I don't see any connection between those numbers and the
shmmax/shmall settings, either --- so I think this must be some busted implementation of a VM-level
I see no Postgres bug here. You need to take this up with your hosting provider, who have given you a
faulty kernel.

regards, tom lane


Don't trust a single provider with your master
database and only set of backups!

Several hosting providers may colocate in the
same datacenter.

Some providers offer a special backup/storage
VPS with generous disk space

Consider sending backups offshore: NL, DE,
FR, UK all have good connectivity and hosting


Hosting is becoming cheaper rapidly. Don't get
locked into multi-year commitments

Let's look at the history of deals posted on

hosting providers who offered
great deals are no longer around

Further Resources quarterly rankings of VPS providers
by performance on I/O and CPU benchmarks detailed benchmarks of
many VPS providers search by price, disk, memory,
bandwidth if you're looking for cheap
auxiliary machines look up past experiences
with a provider, exclusive deals posted, ask for


, CC-BY-NC 3.0 license

I'll put data used