Re: pg_restore fails due to foreign key violation

Поиск
Список
Период
Сортировка
От Olga Vingurt
Тема Re: pg_restore fails due to foreign key violation
Дата
Msg-id CAOkHHZKZ_HGw56OiBAN9s9ZT8o42rH4vriCHPOeYAYdp=jwsfQ@mail.gmail.com
обсуждение исходный текст
Ответ на pg_restore fails due to foreign key violation  (Olga Vingurt <olga.vingurt@gmail.com>)
Ответы Re: pg_restore fails due to foreign key violation
Список pgsql-general
The data indeed wasn't consistent on the source system and foreign key index was corrupted.
After manually cleaning not relevant records and running REINDEX on the table pd_dump and pg_restore worked as expected.

The only question left is how we got into corrupted data state.
In the event logs (PorstgeSQL is runnign on Wondows Server) we found error which looks relevant:
 
ERROR:  could not truncate file "base/12373/17254" to 19 blocks: Permission denied
CONTEXT:  automatic vacuum of table "postgres.public.<table_name>"

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

Предыдущее
От: Ron
Дата:
Сообщение: What is the tuplestore?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore fails due to foreign key violation