Re: Add pre-existing tablespace to new installation

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: Roland Hughes <roland(at)logikalsolutions(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Add pre-existing tablespace to new installation
Date: 2009-06-09 14:18:50
Message-ID: d3ab2ec80906090718k265485bar6e8e52b0e5394372@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Jun 9, 2009 at 10:10 AM, Roland Hughes
<roland(at)logikalsolutions(dot)com>wrote:

> On Tuesday 09 June 2009 08:55:18 am Tino Schwarze wrote:
>
>
> >
>
> > You just need to preserve everything from Postgres' data directory
>
> > (which shouldn't be much data).
>
> >
>
> While it shouldn't be much data, it is also non-robust. With robust
> databases, you can create as many databases as you want in as many places as
> you want. A "fresh install" means that you only have to "tell" the database
> monitor about those places again. Everything is still there and usable.
>
> It's really sad that PostgreSQL doesn't have an ADD TABLESPACE command or
> the functionality built into CREATE TABLESPACE to recognize a tablespace
> already exists and simply recreate the entry for it in the default
> tablespace. When one creates an entire database in this new tablespace,
> PostgreSQL should need nothing other than to know the tablespace exists as
> everything else should be stored in that tablespace.
>

Now now :-) In all fairness, even something like Oracle (I think one
could argue that the industry considers this a 'robust' database) needs
certain metadata available to import a tablespace from another instance --
i.e. you have to export metadata, and if you lost the first instance before
you do that but save a tablespace, you'd be in the same predicament.

A fairly important concept in the Oracle world is protection of a control
file, in postgres, you really need to preserve control structures like the
pg_clog, the control file, etc... Personally, I don't know anything about
RDB, but I would venture a guess that you're going to encounter restrictions
there as well.

--Scott

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Roland Hughes 2009-06-09 14:31:43 Re: Add pre-existing tablespace to new installation
Previous Message Tino Schwarze 2009-06-09 14:17:10 Re: Add pre-existing tablespace to new installation