Rows missing from table despite FK constraint - Mailing list pgsql-general

From Konrad Garus
Subject Rows missing from table despite FK constraint
Date
Msg-id 6645f6441001070212h51919077rea8ae68e44683f71@mail.gmail.com
Whole thread Raw
Responses Re: Rows missing from table despite FK constraint  (Konrad Garus <konrad.garus@gmail.com>)
Re: Rows missing from table despite FK constraint  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Re: Rows missing from table despite FK constraint  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Rows missing from table despite FK constraint  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
List pgsql-general
Hello,

We use PG 8.3. We use pg_dump and pg_restore overnight to create
copies of main database for reporting etc. One dump/restore runs at 9
PM, another at 11 PM.

Today I discovered that the restore at 11 PM failed to recreate a
foreign key constraint, because one row from master table was missing.
It is also missing from main database, but not from the 9 PM dump.

The main database is in curious state: The row from master table is
missing, the row referencing it from slave table is present, and
finally the FK constraint on slave is in place.

Do you have any ideas on how it could possibly happen? What research
could help find the root cause and fix the database?

Thanks.

--
Konrad Garus

pgsql-general by date:

Previous
From: Vincenzo Romano
Date:
Subject: A maybe-bug?
Next
From: Dimitri Fontaine
Date:
Subject: Re: PostgreSQL Write Performance