Re: Rows missing from table despite FK constraint - Mailing list pgsql-general

From Konrad Garus
Subject Re: Rows missing from table despite FK constraint
Date
Msg-id 6645f6441001080730u6d4738c5ped52596a337277b1@mail.gmail.com
Whole thread Raw
In response to Re: Rows missing from table despite FK constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Rows missing from table despite FK constraint  (Konrad Garus <konrad.garus@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: dynamic insert in plpgsql
Next
From: Konrad Garus
Date:
Subject: Re: Rows missing from table despite FK constraint