There should be a way to use the force flag when restoring databases

Поиск
Список
Период
Сортировка
От Joan
Тема There should be a way to use the force flag when restoring databases
Дата
Msg-id CAP4s+CEVVFREtnw8LpeNGUKcVowR0qMNiHw-A9+8h3-a0AQEaQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: There should be a way to use the force flag when restoring databases
Список pgsql-hackers
Since posgres 13 there's the option to do a FORCE when dropping a database (so it disconnects current users) Documentation here: https://www.postgresql.org/docs/current/sql-dropdatabase.html

I am currently using dir format for the output
   pg_dump -d "bdname" -F d -j 4 -v -f /tmp/dir

And restoring the database with
  pg_restore -d postgres -C -c --exit-on-error -F d -j 3 -v /tmp/dir

Having an option to add the FORCE option to either the generated dump by pg_dump, or in the pg_restore would be very useful when restoring the databases to another servers so it would avoid having to do scripting.

In my specific case I am using this to refresh periodically a development environment with data from production servers for a small database (~200M).

Thanks,

Joan

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: generic plans and "initial" pruning
Следующее
От: Thom Brown
Дата:
Сообщение: Re: generic plans and "initial" pruning