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 1gMKVX-0003rS-87 for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 22:16:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMKVV-0000jb-Fe for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 22:16:33 +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 1gMKRk-0007HI-Gf for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 22:12:40 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMKRh-00009x-13 for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 22:12:38 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id C690CC11; Mon, 12 Nov 2018 17:12:35 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 12 Nov 2018 17:12:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=3 TS6LyAmnM99T6bjkQ3ACidPWzHhq4SK355zpjBmfUg=; b=q3hra31blBH5BsiT9 gVOatkK2SVUC7e1yKu7CfBdRscC3pgnNWtYZ3cL/8oy2TDObUS314pEkXCqpB6xf RgU52AsguNnjwZKAJER885MBos7axyc24VPBEfW89zgAn7zTMrPr7IwGXPtwqDv4 uKLxIFP0V/TJki1C0bASz15bk+Bd7KJDPiUUW5thwX4eP3CFIxhcEA/fnMcVPMtd x2+pw28/eIAz02LtvkRfr1gM2pzpCq2ZccUlFpY0bHfZY8fvGK69rWhyjib+YKs0 K7t+nQwqFIciFrgLOER4HcHwzWaxgmc7RDosrz/INUQKDJXtH2ENsyqQvpxkIDuF EiOhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3TS6LyAmnM99T6bjkQ3ACidPWzHhq4SK355zpjBmf Ug=; b=eytE+5YJRfLb2Ywegy64z8sE+rNVdLU26jdqRPBptvPo7lNRFDutMnQ5o MVCm+3zs5CKqZsIPe+9gyrZ9UKleRerd+vwXAEB1wTw0MzZRah3YCbGKkI8HrHyY BNneUJd99eCvnhdC4vqCdRvLi2K8/GfEgNUEkk4/CrCL4BdkFEQnaRUBNd2xl0og Ki9NcuZu/WdWW9EWSzMF0fqiSgCquoXufc3lxQrXM50sO6+ouDiGlsoBxnXT4pWV oLaF8Vfl2m2z0DQsCD8xaIZNyPphgpyizrVvqhWpsPzt6KmBcUDHAQv71IHvRWE7 oxgLteB7r9VTd45SlQoqmz9iEviDg== X-ME-Sender: X-ME-Proxy: Received: from ranger.suse (c-73-239-117-238.hsd1.wa.comcast.net [73.239.117.238]) by mail.messagingengine.com (Postfix) with ESMTPA id 7108F102FD; Mon, 12 Nov 2018 17:12:34 -0500 (EST) Subject: Re: Is pg_restore in 10.6 working? To: raf , pgsql-general@lists.postgresql.org References: <28066.1542048297@sss.pgh.pa.us> <20181112220724.mx6y3xrtrwsgrvkb@raf.org> From: Adrian Klaver Message-ID: Date: Mon, 12 Nov 2018 14:12:33 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181112220724.mx6y3xrtrwsgrvkb@raf.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/12/18 2:07 PM, raf wrote: > Tom Lane wrote: > >> David writes: >>> I have some experience with different versions of Postgres, but I'm just >>> getting around to using pg_restore, and it's not working for me at all. >>> ... >>> But a matching pg_restore command does nothing. >>> pg_restore -U postgres -f predata.sql -v >> >> This command expects to read from stdin and write to predata.sql, so >> it's not surprising that it's just sitting there. What you want >> is something along the lines of >> >> pg_restore -U postgres -d dbname -v > >> regards, tom lane > > Does that mean there's a bug in the usage message? > > pg_restore --help says (admittedly on 9.5 but it's probably the same with 10.6): > > Usage: > pg_restore [OPTION]... [FILE] > > ... > > If no input file name is supplied, then standard input is used. > > To me, that says that a filename on the command line after the options > will be read as the source of the restore. Only if it is absent would > stdin be used. The example Tom showed was for using a plain text file as the source instead of the default which is one of the custom formats. > > Apologies if the usage message for 10.6 doesn't say the same thing. > > cheers, > raf > > -- Adrian Klaver adrian.klaver@aklaver.com