Re: TOC errors - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: TOC errors
Date
Msg-id 20130802181321.GR5669@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: TOC errors  (Perry Smith <pedzsan@gmail.com>)
List pgsql-general
Perry Smith escribió:

> On Aug 2, 2013, at 12:29 PM, Perry Smith <pedzsan@gmail.com> wrote:

> > I've used the custom format.  The error tells me a line number but I
> > can't look at it.  Is there a way that I can convert the custom
> > format to something I can view?

Sure, pg_restore can save its output to a file instead of to a database.

> > Also, I have turned off all the foreign key checking while I was
> > doing the restore but I guess this is the unique checking that is
> > causing the error. Can I turn that off (without doing a table
> > modify)?

No.

> The other confusing part about this is "its not true" :-)... The tuple
> shows up only once in the original database that was dumped.  So, its
> like it is getting a read error or something while doing the restore.

Probably one of the copies is not visible to the index, which would
explain why the other one was allowed in in the first place.  To verify
this, do a select for that value, but first set enable_indexscan and
enable_bitmapscan to off.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: Perry Smith
Date:
Subject: Re: TOC errors
Next
From: Alberto Bussolin
Date:
Subject: xlog min recovery request ... is past current point ...