Re: Rows violating Foreign key constraint exists

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Rows violating Foreign key constraint exists
Дата
Msg-id CAH2-WzkCUMSjLtPFO2NscAzqoJVYiOvycQXAaShdZHy=EUUs1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Rows violating Foreign key constraint exists  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Rows violating Foreign key constraint exists
Список pgsql-general
On Fri, Nov 29, 2019 at 7:23 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Or try using contrib/amcheck, which is available in Postgres 10.
Perhaps try the query here, modified to verify all B-Tree indexes (not
just those indexes in the pg_catalog schema):

https://www.postgresql.org/docs/10/amcheck.html

--
Peter Geoghegan



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Counting booleans in GROUP BY sections
Следующее
От: Alexander Farber
Дата:
Сообщение: Re: Counting booleans in GROUP BY sections