Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMJPm-0000Qd-E0 for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 21:06:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMJPk-0000Lg-Pg for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 21:06:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMJPk-0000LZ-Em for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 21:06:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMJPh-00077n-28 for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 21:06:31 +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 wACL6QTO001938; Mon, 12 Nov 2018 16:06:26 -0500 From: Tom Lane To: Rob Sargent cc: David , pgsql-general@lists.postgresql.org Subject: Re: Is pg_restore in 10.6 working? In-reply-to: <9b015a12-d265-d863-2554-08602b5d913b@gmail.com> References: <28066.1542048297@sss.pgh.pa.us> <708fdafe-dfa3-7d26-59fa-992595671b77@gmail.com> <9b015a12-d265-d863-2554-08602b5d913b@gmail.com> Comments: In-reply-to Rob Sargent message dated "Mon, 12 Nov 2018 14:00:49 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1936.1542056786.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 12 Nov 2018 16:06:26 -0500 Message-ID: <1937.1542056786@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Rob Sargent writes: > On 11/12/18 12:39 PM, David wrote: >> I'm not following your question.  The pre-data and post-data sections >> each go to an individual file, but the data section goes to a >> directory.  I can restore the files using psql, but it is the restore >> of the directory that is hanging. The other bit that I think David is missing is that pg_dump's default output format is a plain-text SQL script, which is meant to be fed to psql not pg_restore. To get something that pg_restore can work with, you need to specify one of the non-text dump formats (typically, you'd use -Fc or -Fd). The situation in which you'd want to use "pg_restore -f" is if you want to reconstruct a plain-text SQL script from one of the non-text dump formats, rather than just restoring directly into a database. regards, tom lane