Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNhuO-00086I-Km for pgsql-general@arkaria.postgresql.org; Sat, 09 Dec 2017 16:23:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNhuN-00038T-Rv for pgsql-general@arkaria.postgresql.org; Sat, 09 Dec 2017 16:23:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eNhuN-00038J-KX for pgsql-general@lists.postgresql.org; Sat, 09 Dec 2017 16:23:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eNhuJ-00034y-M7 for pgsql-general@postgresql.org; Sat, 09 Dec 2017 16:23:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vB9GNGBB006647; Sat, 9 Dec 2017 11:23:16 -0500 From: Tom Lane To: Rob Sargent cc: Blake McBride , pgsql-general@postgresql.org Subject: Re: Problem with COPY command on pg_dump In-reply-to: <93532B21-1F53-424D-954E-1096C2852C12@gmail.com> References: <93532B21-1F53-424D-954E-1096C2852C12@gmail.com> Comments: In-reply-to Rob Sargent message dated "Sat, 09 Dec 2017 08:53:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <6645.1512836596.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 09 Dec 2017 11:23:16 -0500 Message-ID: <6646.1512836596@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rob Sargent writes: >> On Dec 9, 2017, at 8:42 AM, Blake McBride wrote: >> I am using pg_dump on version 9.5.10 and trying to import it on version= 9.3.20. Many (or all) COPY commands are failing with messages like: = >> psql:16504.db:16874: ERROR: missing data for column "street" >> CONTEXT: COPY address, line 1: "" > Is there in fact =E2=80=98street=E2=80=99 data in the file? Sounds lik= e you have the wrong number of columns. Do you have your actual dump and r= estore commands to show here? While pg_dump certainly does sometimes produce output that doesn't reload into older servers, we try to minimize such problems --- and in any case, the actual COPY data shouldn't be a source of issues. I'm suspicious that the true problem occurred earlier; maybe a table drop/creation failed and now COPY is trying to load into a pre-existing table that has the right name and the wrong column list. I'd counsel looking at the *first* error message and resolving that, then trying again. Anything later could just be cascaded failures. regards, tom lane