Re: Replacing a production db

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Replacing a production db
Дата
Msg-id 53A1FDB8.8000209@hogranch.com
обсуждение исходный текст
Ответ на Replacing a production db  (Nicolás Lichtmaier <nico.lichtmaier@gmail.com>)
Список pgsql-general
On 6/18/2014 1:05 PM, Nicolás Lichtmaier wrote:
> Is there a way to replace a production database with another as part
> of a new "release" of our website?
>
> Where I work we have a scheme of pushing code+db releases to "testing"
> and then to "production". Most of our databases use MySQL and I was
> told they can just rename the db and it works. We are adopting
> PostgreSQL for some new developments and we'd like to do something
> similar. I've tried loading the dump in a single transaction, but that
> has many problems as the database is fairly big for that (some GBs).
> Is there a trick I'm missing here?

we do updates of our production systems with .sql files that are version
deltas, eg, they alter existing tables and add new ones, possibly
including new 'static data'.   if the update requires code changes, then
we shut the app(s) down, run the database upgrade, install the new code,
and restart the app(s).   Usually we try to do our schema updates so the
old code will continue to work with the new schema, so the new code can
be cut in incrementally with virtually zero downtime.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



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

Предыдущее
От: Tim Clarke
Дата:
Сообщение: Re: Replacing a production db
Следующее
От: Andy Colson
Дата:
Сообщение: Re: Replacing a production db