Re: referential integrity violation - key referenced from

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Luiz Henrique <luizhwk(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: referential integrity violation - key referenced from
Date: 2006-08-02 16:13:59
Message-ID: 20060802091140.L36863@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 2 Aug 2006, Luiz Henrique wrote:

> Hi,
>
> I'm running Postgresql 7.3 in Debian Woody OS.
>
> After some time working properly, insert's statements related this error:
>
> ----
> referential integrity violation - key referenced from xxx not found in yyy
> ----
>
> This error would be normal, if the key really doesn't exist, but the key
> exist.
> The insert's work some times, and some times don't.
>
>
> Is there any file corrupted?

It's hard to say. I'd have expected that a select * from parent where
key=value would fail for both the fk check and for a check to see if the
key exists assuming they used the same plan. Can you make a standalone
test case?

> Removing the fk constraint would resolve the problem?

Well, it'd stop the message, but if there is corruption, it wouldn't fix
that.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-08-02 16:31:32 Re: BUG #2561: Manual is wrong: You can't grant a group to public
Previous Message Brian Hurt 2006-08-02 14:58:47 Re: BUG #2561: Manual is wrong: You can't grant a group to