Re: Detach/attach database - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Detach/attach database
Date
Msg-id CA+U5nMJt=ndva-Rx5u8SjJhZfmX_qwhtfChDB34K1005t6aO_Q@mail.gmail.com
Whole thread Raw
In response to Detach/attach database  (Thom Brown <thom@linux.com>)
Responses Re: Detach/attach database
List pgsql-hackers
On Sun, Nov 13, 2011 at 1:13 PM, Thom Brown <thom@linux.com> wrote:

> I don't know if this has been discussed before, but would it be
> feasible to introduce the ability to detach and attach databases? (if
> you're thinking "stop right there" skip to the end)  What I had in
> mind would be to do something like the following:

That would be better done at the tablespace level, and then the
feature becomes "transportable tablespaces". Which seems like a good
and useful idea to me.

> You may now be able to infer where this notion came from, when someone
> asked if you can clone databases without kicking users off.  However,
> this isn't a schema-only copy, but naturally contains data as well.

The OP wanted to do this without freezing activity on the database,
which is not easy...

OTOH we can do a backup of just a single database and then filter
recovery at database level to produce just a single copy of another
database on its own server, if anyone wanted that.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: SQLDA fix for ECPG
Next
From: Tom Lane
Date:
Subject: Re: why do we need two snapshots per query?