Re: CLONE DATABASE (with copy on write?)

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: CLONE DATABASE (with copy on write?)
Дата
Msg-id CA+U5nMJ_srUrSfo7K=D8Fv3hAEF=fc20W2_XWR1tyQFabM3_Xg@mail.gmail.com
обсуждение исходный текст
Ответ на CLONE DATABASE (with copy on write?)  ("Clark C. Evans" <cce@clarkevans.com>)
Ответы Re: CLONE DATABASE (with copy on write?)  (Gregg Jaskiewicz <gryzman@gmail.com>)
Re: CLONE DATABASE (with copy on write?)  ("Clark C. Evans" <cce@clarkevans.com>)
Список pgsql-general
On Sat, Nov 12, 2011 at 9:40 PM, Clark C. Evans <cce@clarkevans.com> wrote:

> 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.

An interesting proposal. Thanks for taking the time to raise this.

The existing situation is that you need to either

1) quiesce the database so it can be copied locally

2) take a hot backup to create a clone on another server


(1) currently involves disconnection. Would a command to quiesce
sessions without disconnection be useful? We could get sessions to
sleep until woken after the copy. With large databases we would still
need to copy while sessions sleep to ensure a consistent database
after the copy.

Is (2) a problem for you? In what way?

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

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

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