Re: Changing the concept of a DATABASE

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changing the concept of a DATABASE
Date: 2012-05-22 12:23:33
Message-ID: 638A2D82-C15B-47A6-80A2-2F5381DC0620@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On May22, 2012, at 13:47 , Simon Riggs wrote:
> On 22 May 2012 12:35, Florian Pflug <fgp(at)phlo(dot)org> wrote:
>>> * Allow users to access tables in >1 database easily, with appropriate rights.
>>
>> That one I'm very sceptical about. In the long run, I think we want better
>> separation of databases, not less, and this requirement carries a huge risk
>> of standing in the way of that. Also, I think that once we integrate the postgres
>> FDW into core (that's the plan in the long run, right?), we're going to get
>> a good approximation of that essentially for free.
>
> It's a poor approximation of it, free or not.
>
> If it actually worked well, I'd be happy. It doesn't. No proper
> transaction support, no session pool, poor planning etc etc. At best
> its a band-aid, not something sufficiently good to recommend for
> general production use.

These all sound fixable, though.

> FDWs are very good but aren't good enough for intra-database usage.

OTOH, cross-database queries would by design be limited to databases
within one cluster, whereas a FDW-based solution would not. I don't really see
the different between telling people "put all your tables into one database
if you need to access them from within one session" and "put all your databases
on one server if you need to access them from within one session".

Plus, the more tightly different databases in the same cluster are coupled,
the more people will setup one cluster per database for performance reasons.
Then, when they discovered they need inter-database queries after all, we'll
again have to tell them "well, then don't set things up the way you have".

If we want to make it easier for people to migrate from multiple databases
to a single database with multiple schemas, maybe we should look into allowing
nested schemas? AFAIK, the main reason not to do that are ambiguities in the
meaning of identifiers, which cross-database queries would have to deal with
also.

best regards,
Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-05-22 12:29:48 Re: Getting rid of cheap-startup-cost paths earlier
Previous Message José Luis Tallón 2012-05-22 12:14:43 Re: Changing the concept of a DATABASE