Re: restoring with pg_restore

Поиск
Список
Период
Сортировка
От Frank Bax
Тема Re: restoring with pg_restore
Дата
Msg-id 48108465.90207@sympatico.ca
обсуждение исходный текст
Ответ на Re: restoring with pg_restore  ("Didier Gasser-Morlay" <didiergm@gmail.com>)
Список pgsql-novice
Didier Gasser-Morlay wrote:
> - I believe that restoring a backup onto an existing, non empty
> database generates 'primary key violations' and I am not sure about
> what happens to exsiting records, I do not believe they are updated so
> I can get a restored database with data inconsistent with the 'live'
> server


Correct; existing rows within tables will not be updated.


> so, as I understand it, I would on the report server need to drop the
> database ; create a new bank database and restore onto this new
> database.
 >
> If I am correct so far, my question is : is it a good practice to drop
> and create a database every day on a postgreSQL server or do I risk
> any corruption of the database cluster (that's how I call the
> directory and files created with initdb)


Go ahead.  Simply use -c option of pg_dump/pg_dumpall.

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Limiting the number of connections for one user
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Changing a trigger function