Re: CLONE DATABASE (with copy on write?)

Поиск
Список
Период
Сортировка
От Igor Polishchuk
Тема Re: CLONE DATABASE (with copy on write?)
Дата
Msg-id 1321152586.1857.8.camel@localhost
обсуждение исходный текст
Ответ на CLONE DATABASE (with copy on write?)  ("Clark C. Evans" <cce@clarkevans.com>)
Список pgsql-general
I'm in a similar position, cloning a database multiple times to provide
development and qa databases for multiple groups. A feature desired by
Clark would greatly help many people with their development and qa
databases.
On the other hand, I imagine,  a feature like this would not be easy to
develop, and it is useful for many but not all the users.
So I doubt we can have it any time soon.


On Sat, 2011-11-12 at 16:40 -0500, Clark C. Evans wrote:
> Hello all!
>
> Our company has some headaches in our application development
> and deployment process.  The chief problem is, "creating stages",
> which to this audience is, cloning a database efficiently,
> making and testing a few changes, perhaps recording the
> differences between databases, and then dropping the database.
>
> I'm eternally grateful for someone who pointed out that we
> should be using "CREATE DATABASE ... WITH TEMPLATE".  However,
> this has two big disadvantages.  First, it only works if you
> can kick the users off the clone.  Secondly, it still takes
> time, uses disk space, etc.  We have some big databases.
>
> I was also thinking about using ZFS with PostgreSQL to do
> some sort of copy-on-write.  However, this would require me
> to spawn a whole *new* PostgreSQL instance.  In both of these
> cases, you lose your cache...
>
> So, I was wondering... could PostgreSQL grow the ability to
> "CLONE" a database by re-using existing file system blocks,
> sharing them across databases?  This would perhaps be fast,
> keep the shared memory cache relevant for both the old copy
> and the clone, and remove WAL overhead.  Then, if the block
> has to be edited, it'd be cloned in memory, and the clone
> would be flushed.
>
> I'm just imagining a world where "deploying" a new version
> of our software that makes very small catalog changes and
> tweaks a few rows would be... quick.  Quick to try, check,
> test, and even deploy on live servers.
>
> Best,
>
> Clark
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Igor Polishchuk
Дата:
Сообщение: Re: Re: Large values for duration of COMMITs and slow queries. Due to large WAL config values?
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Large values for duration of COMMITs and slow queries. Due to large WAL config values?