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-15 13:50:29 |
Message-ID: | ba0a1f30608150650y211042f8ib8bc92d6ed765f88@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)megazone(dot)bigpanda(dot)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).
>
From | Date | Subject | |
---|---|---|---|
Next Message | Anita Lederer | 2006-08-15 15:20:31 | out of memory |
Previous Message | Tom Lane | 2006-08-15 13:30:16 | Re: BUG #2576: tcp_keepalive doesn't work |