recovering from a --clean dump

Поиск
Список
Период
Сортировка
От samfisch@googlemail.com
Тема recovering from a --clean dump
Дата
Msg-id 1144351632.620190.114490@g10g2000cwb.googlegroups.com
обсуждение исходный текст
Список pgsql-general
hello,
I use an automated script that if it detects a problem in a database
uses a dumb from another db to recover data.

'pg_dump -c -h host1 d1 | psql -a -h host2 -d db2 >> recover_dump 2>&1'

now my recover_dump tells me a unix index could`nt be created as the
table contains duplicated keys.

My guess is the data there was data inserted by the application while
the restore was inserting data and the constraints where not set.
This seems possible to me as there is no LOCK statement in the dump.

So actually I m searching for a way to tell the target db not to take
any connections while restoring
but also wonder if I in future have to take more action to protect
databases I dump --clean dumps to.

debian sarge
psql (PostgreSQL) 7.4.7


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

Предыдущее
От: "Tobias Herp"
Дата:
Сообщение: encode/decode trouble ('invalid input syntax for type bytea'); bug?
Следующее
От: SunWuKung
Дата:
Сообщение: Re: case insensitive match in unicode