From: Andres Freund <andres@2ndquadrant.com>
To: dominik@dominikdorn.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8577: pg_dump custom format exported dump can't be imported again
Date: Tue, 5 Nov 2013 22:15:36 +0100
Message-ID: <20131105211536.GI14819@awork2.anarazel.de> (raw)
In-Reply-To: <E1Vdncy-0002HS-7a@wrigleys.postgresql.org>
References: <E1Vdncy-0002HS-7a@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2013-11-05 20:53:32 +0000, dominik@dominikdorn.com wrote:
> For some reason, pg_dump inserts an entry with null values into the dump
> (even for the primary key).
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 3370; 0 61665 TABLE DATA
> lytartist lyriks
> pg_restore: [archiver (db)] COPY failed for table "lytartist": ERROR: null
> value in column "nartistnr" violates not-null constraint
> CONTEXT: COPY lytartist, line 21841: "\N \N \N \N \N \N \N \N \N \N \N"
> pg_restore: [archiver] worker process failed: exit code 1
Hm. That might be caused by on-disk corruption...
> Of course, querying for the entry with a NULL PK results in no results on
> the source machine.
Well, that will probably have used the the index, try it by doing
something like:
SET enable_indexscan = false;
SET enable_bitmapscan = false;
SET constraint_exclusion = false;
EXPLAIN SELECT ctid, * FROM lytartist WHERE nartistnr IS NULL;
SELECT ctid, * FROM lytartist WHERE nartistnr IS NULL;
The explain should show a sequential scan, right? Does it now return a row?
Greetings,
Andres Freund
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@2ndquadrant.com, dominik@dominikdorn.com
Subject: Re: BUG #8577: pg_dump custom format exported dump can't be imported again
In-Reply-To: <20131105211536.GI14819@awork2.anarazel.de>
References: <E1Vdncy-0002HS-7a@wrigleys.postgresql.org> <20131105211536.GI14819@awork2.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox