Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
Date: 2011-08-07 21:38:02
Message-ID: 4E3F05BA.6010708@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-testers pgsql-www

On 7/08/2011 11:43 PM, Ivan Sergio Borgonovo wrote:
> On Sun, 07 Aug 2011 20:41:27 +0800
> Craig Ringer<ringerc(at)ringerc(dot)id(dot)au> wrote:
>
>> By the way, one of the reasons you're not finding much free
>> hosting for PostgreSQL is that it takes a fair bit of work to run
>> Pg multi-tenanted. Your additional requirement for Java and Tomcat
> Why should pg be harder than anything else?

Before I go on: I'm not running a hosting provider. Most of this is
gathered from time on the lists, plus my own observations from using Pg
in situations where I want to prevent different apps sharing a DB from
affecting each other. Given that qualification:

Things that contribute to making it harder to offer multi-tenanted
database hosting services with Pg include: The global catalogs, in
particular global user lists; relatively limited options for automatic
load limitation and prioritisation; difficulty of preventing certain
classes of effective denial of service by authorized users; shared WAL
making it harder to isolate load and limit one DB's effects on another;
difficulties completely hiding users from each other; the need to tune
autovacuum to make sure it keeps up with load; etc. In Pg, DBs in a
cluster affect each other in various ways, but because of the
pinned-in-RAM nature of shared_buffers its hard to run one cluster per
user as would be ideal.

This doesn't mean you can't use Pg for multi-tenanted DB hosting. It
just makes it harder, and means its more sysadmin work, therefore more
time and cost.

There are DBs - mostly $OMFGLOTS DBs - that offer much greater
facilities for controlling access and isolating load than Pg does and
are better suited to multi-tenanted use. Of course, their costs are such
that it's probably cheaper to hire an army of sysadmins to run a giant
cluster of Pg boxes instead...

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2011-08-07 22:40:33 Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
Previous Message Ivan Sergio Borgonovo 2011-08-07 15:43:37 Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?

Browse pgsql-testers by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2011-08-07 22:40:33 Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
Previous Message Ivan Sergio Borgonovo 2011-08-07 15:43:37 Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?

Browse pgsql-www by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2011-08-07 22:40:33 Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
Previous Message Ivan Sergio Borgonovo 2011-08-07 15:43:37 Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?