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

From Craig Ringer
Subject Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
Date
Msg-id 4E3F05BA.6010708@ringerc.id.au
Whole thread Raw
In response to Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Responses Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
List pgsql-general
On 7/08/2011 11:43 PM, Ivan Sergio Borgonovo wrote:
> On Sun, 07 Aug 2011 20:41:27 +0800
> Craig Ringer<ringerc@ringerc.id.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

pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?
Next
From: Ivan Sergio Borgonovo
Date:
Subject: Re: Pg multi-tenanted hard? was: FREE hosting platforms with PostgreSQL, Java SDK, Tomcat, ecc.?