Skip site navigation (1) Skip section navigation (2)

Re: referential integrity violation - key referenced from

From: "Luiz Henrique" <luizhwk(at)gmail(dot)com>
To: "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: referential integrity violation - key referenced from
Date: 2006-08-04 14:30:04
Message-ID: ba0a1f30608040730n308196bbw7972aa8f70d3458b@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi, could you tell me how postgresql look for a referenced key? It looks in
table index? Maybe only the index is corrupted?

Thanks!

On 8/2/06, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> wrote:
>
> 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.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2006-08-04 15:08:08
Subject: Re: Restoring 7.4 "pg_dumpall -o" output in 8.1 fails
Previous:From: Andreas GustafssonDate: 2006-08-04 12:05:24
Subject: Restoring 7.4 "pg_dumpall -o" output in 8.1 fails

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group