Re: URGENT: referential integrity problem

From: Richard Huxton <dev(at)archonet(dot)com>
To: pginfo <pginfo(at)t1(dot)unisoftbg(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: URGENT: referential integrity problem
Date: 2003-01-29 15:49:44
Message-ID: 200301291549.44238.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 29 Jan 2003 12:18 pm, pginfo wrote:
> I have 2 tables, in the first one I have field that points to the table
> key from the second.
[snip]
> After few min. pg drops with:
> ERROR: <unnamed> referential integrity violation - key referenced from
> a_table1 not found in a_table2 !
>
> My questions:
> How is it possible, that pg do not check the references by inserts?

Might be a damaged index - try a REINDEX (specified in the SQL reference
manual). I'd also run some tests against your hardware, make sure you don't
have any memory or disk problems.

> How can I check the db integrity for all tables at once ( I need to be
> sure, that do not exists any problems. It is production server).

Simplest way I can think of would be to pg_dump and restore to a test
installation.

--
Richard Huxton

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message pginfo 2003-01-29 16:11:56 Re: URGENT: referential integrity problem
Previous Message Holger Klawitter 2003-01-29 15:47:35 Re: Firewalls and Postgres