Re: initdb on build machine and moving to production machine

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: initdb on build machine and moving to production machine
Дата
Msg-id 13268.979258425@sss.pgh.pa.us
обсуждение исходный текст
Ответ на initdb on build machine and moving to production machine  (oberpwd@anubis.network.com (Wade D. Oberpriller))
Список pgsql-general
oberpwd@anubis.network.com (Wade D. Oberpriller) writes:
> I want to be able to do an initdb on a build machine and then copy this new
> database to a production machine and run with it. One thing I have noticed is
> that initdb needs an absolute path, so if I copy the database it needs to
> reside in an identical location as where it was initialized.

Have you tried it?  AFAIK the -D path is not actually stored anywhere,
so it seems to me this would work, assuming that (a) both machines are
of identical architectures (in fact I strongly suggest you be running
identical postgres executables), and (b) you shut down the postmaster
on the source machine while you make a copy of the $PGDATA tree.
The *whole* $PGDATA tree, mind you, don't try to be choosy.  But you
should be able to restore that directory tree to a different path
if you want.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Loading optimization
Следующее
От: "rob"
Дата:
Сообщение: Re: Selective Auto-Timestamp [using triggers?]