Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdnyV-0000hR-Dp for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Nov 2013 21:15:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VdnyU-000645-Lp for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Nov 2013 21:15:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdnyT-00063y-NE for pgsql-bugs@postgresql.org; Tue, 05 Nov 2013 21:15:45 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdnyN-0007DC-8o for pgsql-bugs@postgresql.org; Tue, 05 Nov 2013 21:15:45 +0000 Received: from anarazel.de (p5DDC6B7E.dip0.t-ipconnect.de [93.220.107.126]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0M1GfI-1VtGO928a0-00tghw; Tue, 05 Nov 2013 22:15:37 +0100 Received: by anarazel.de (Postfix, from userid 1000) id E076C1008FF; Tue, 5 Nov 2013 22:15:36 +0100 (CET) Date: Tue, 5 Nov 2013 22:15:36 +0100 From: Andres Freund To: dominik@dominikdorn.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8577: pg_dump custom format exported dump can't be imported again Message-ID: <20131105211536.GI14819@awork2.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Provags-ID: V02:K0:deXA6GVQRuTlfz5JyMBd9Q9VU0gFdFjVXJ2ldaLBbaq L2fmRmnUQ50b0ackfaeboJF+aQDv7oMKnO92lNRnr03t1YoXS9 OAxcK7yBbcg+3BM6qaHXKaQoOVNsu4xFusS7M/KmBQTxy3AB2u pyaD6bVJQJQtzQ2ZrexWOH/FajapJrycncmOjmaSy3QbLDsxrz g1L/x5PkTWJ/LkmviaaO6Tj0tSsmAaKg1NU+Teo6ylvAu0CevC 286GBfOVTSOaD/4wiEvPJnHdXWSvVo0QMCqOCg4HkJMHJeLHwG sEwFHfeR3TFBUmX31X+OD+e6tDLTBOSCaZK6tZp6g3wXgfi75u l0mmGtWrQVm+J0BpYNz2/kishJgQNzaDpbouVx059 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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