Database copy

Поиск
Список
Период
Сортировка
От Kim Heckler
Тема Database copy
Дата
Msg-id CH2PR07MB72696EB34DE5AD6EA3B1041D863C9@CH2PR07MB7269.namprd07.prod.outlook.com
обсуждение исходный текст
Ответы Re: Database copy  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-novice

All,

 

I have read in the CREATE DATABASE documentation:

 

Although it is possible to copy a database other than template1 by specifying its name as the template, this is not (yet) intended as a general-purpose COPY DATABASE facility. The principal limitation is that no other sessions can be connected to the template database while it is being copied. CREATE DATABASE will fail if any other connection exists when it starts; otherwise, new connections to the template database are locked out until CREATE DATABASE completes. See Section 22.3 for more information.

 

Can I safely use this on a regular basis to copy a database within the same instance/server?  If not, I’ll use pg_dump and pg_restore to complete the ask.

 

Thank you.

 

 

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

Предыдущее
От: Pól Ua Laoínecháin
Дата:
Сообщение: Re: Scripting with subdirectories - how to specify script locations.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Database copy