Re: Rows violating Foreign key constraint exists

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rows violating Foreign key constraint exists
Дата
Msg-id 13475.1575041005@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Rows violating Foreign key constraint exists  (Nandakumar M <m.nanda92@gmail.com>)
Ответы Re: Rows violating Foreign key constraint exists
Список pgsql-general
Nandakumar M <m.nanda92@gmail.com> writes:
>> It could be that somebody disabled the triggers, but that would have to
>> be a superuser.  And I hope that people randomly disabling system triggers
>> on tables don't have superuser access to your database.

> It is unlikely that this happened. So I am assuming corruption.
> But I am able to query both the referred and referring table
> successfully without any 'missing chunk' or similar errors that
> usually indicate corruption.
> Is it possible that corruption might cause data loss like this without
> any errors?

The most likely "corruption" explanation is something wrong with the
indexes on the referenced and/or referencing column, causing rows to
not be found when referential actions should have found them.  Random
querying of the tables wouldn't necessarily expose that --- you'd need
to be sure that your queries use the questionable indexes, and maybe
even search for some of the specific rows that seem mis-indexed.

            regards, tom lane



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

Предыдущее
От: Nandakumar M
Дата:
Сообщение: Re: Rows violating Foreign key constraint exists
Следующее
От: Alexander Farber
Дата:
Сообщение: Counting booleans in GROUP BY sections