Re: referential integrity violation - key referenced from - Mailing list pgsql-bugs

From Luiz Henrique
Subject Re: referential integrity violation - key referenced from
Date
Msg-id ba0a1f30608150650y211042f8ib8bc92d6ed765f88@mail.gmail.com
Whole thread Raw
In response to Re: referential integrity violation - key referenced from  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: referential integrity violation - key referenced from
List pgsql-bugs
Hi,

my problem was problably corrupted index files. I recreated the index and
it's ok now. The hardware was being unpluged from power source without
shuthing down, I guess that's the cause.
I used the fallowing commands to recreate index:

/etc/init.d/postgresql stop
su postgres
/usr/lib/postgresql/bin/postgres -D /var/lib/postgres/data -O -P db
reindex database db;
/etc/init.d/postgresql start

Thanks!

On 8/4/06, Stephan Szabo <sszabo@megazone.bigpanda.com> wrote:
>
>
> On Fri, 4 Aug 2006, Luiz Henrique wrote:
>
> > Hi, could you tell me how postgresql look for a referenced key? It looks
> in
> > table index? Maybe only the index is corrupted?
>
> It basically runs a query like:
> SELECT * FROM parenttable WHERE keycol1 = ? [AND keycol2 = ? ...] FOR
> SHARE
>
> It should act like a prepared statement would (which might be different
> than it would with the ?s replaced by the actual values).
>

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2576: tcp_keepalive doesn't work
Next
From: "Anita Lederer"
Date:
Subject: out of memory