Re: Rows missing from table despite FK constraint

From: Konrad Garus <konrad(dot)garus(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>, pgsql-general(at)postgresql(dot)org
Subject: Re: Rows missing from table despite FK constraint
Date: 2010-01-08 15:30:03
Message-ID: 6645f6441001080730u6d4738c5ped52596a337277b1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How shall I do it? Is this correct:

1. Run:

select ctid, * from attachment where ...

on the table with such a WHERE clause that includes rows around the
missing ones. ctid around missing rows seems to be (603712,78) and
(603714,1). Note that 603713 is missing.

2. Run:

select relfilenode from pg_class where relname = 'attachment';"

(returns 922494)

3. Run:

pg_filedump -i -f -R 603712 603714
/var/lib/postgresql/8.3/main/base/922438/922494 > myfile

I'm unsure about it, because the resulting file does not seem to have
the rows I saw listed for block 603712 or 603714. I checked by text in
VARCHAR columns.

--
Konrad Garus

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Konrad Garus 2010-01-08 15:39:53 Re: Rows missing from table despite FK constraint
Previous Message Grzegorz Jaśkiewicz 2010-01-08 15:13:48 Re: dynamic insert in plpgsql