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 1gMJKR-0008V6-La for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 21:01:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMJKP-000494-Eg for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 21:01:01 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMJKP-00048P-2Y for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 21:01:01 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMJKI-0007OU-Hj for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 21:01:00 +0000 Received: by mail-pf1-x443.google.com with SMTP id g7-v6so4874851pfo.10 for ; Mon, 12 Nov 2018 13:00:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=NTAM7NnMpkccZ2pWRAT8ni5wbPrKxc5D0VgOtOv70KI=; b=EWmAZitpghK051MQGRQxBmj25JgI0pKDEHEPtwvYv5uMxUouGOcbxXljdUpid+3kRQ BWIV6umL8M9JofwJgStOokrkrisgW6OjGb0wx/N/6um/J7a+oOCkHLAy1lY80I/KTdRV 4rtS+Da3gX5ohlJIMDtjqZrd4s6HWMOplj1x4WuvXILU0tv7BLQ//JrFS/0DyL+6UoA2 GMpt6xMYO4S290aQk6ky1sGRBkPFpgBjV2xDOY101kE1hBLVMklhQlSihiZ2pCtO1I6t yrC4wNc3RvpfKPnQ5oOZP8mJSFm7SUkoPpEgdYBL0fVLfKV9A9zbJSu3kCKAiEi2Lk56 fD/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=NTAM7NnMpkccZ2pWRAT8ni5wbPrKxc5D0VgOtOv70KI=; b=boPzDbsgYSXa+y5yYuOW8NszbVKG6gTkkb/IgxIdh0ouhJkCwlv8/H0kT+eG9G5osw Rz4W5ONyQyb8YymhnwHH9p4RmyHfWlHMIMtdcOIYLyQboVWt4J+p02RzAATDytzxlNAI KCYPNN3VrzdchGApja/HC4mDpIgrWUD8gem33fLIH/5W/+EF4i/34RrcErYMgrUuc2cU QJ5kRZpThDnHzc4uYW8lgY0xhna8Vlw/ZqGLVtuA2myShTUByZijVj1DJPaIr/GWFMGV UbJieHmycCP9A9UOSWVFworfKmmlngNf3WJBRYCevnTWLbGSZpVm7beTz24wJqpihDl/ 0DRQ== X-Gm-Message-State: AGRZ1gJNQU2YTHe+Zvw6FG8ZXVjleRbesQ3B/0nssKl3omCSkb2amGer 4OqNPRy2h0Lgp6HOokwkslGvP+nr X-Google-Smtp-Source: AJdET5d8ptkm9VgMEu5mJCZZkISFPwzOo5JcQVx108XyBsLGhky9TtZOhgks4MMstzDMt7pd8W4E+g== X-Received: by 2002:a63:8043:: with SMTP id j64mr2200827pgd.405.1542056451586; Mon, 12 Nov 2018 13:00:51 -0800 (PST) Received: from [10.104.134.14] ([155.100.47.6]) by smtp.gmail.com with ESMTPSA id y88-v6sm22917328pfd.104.2018.11.12.13.00.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 13:00:50 -0800 (PST) Subject: Re: Is pg_restore in 10.6 working? To: David Cc: pgsql-general@lists.postgresql.org References: <28066.1542048297@sss.pgh.pa.us> <708fdafe-dfa3-7d26-59fa-992595671b77@gmail.com> From: Rob Sargent Message-ID: <9b015a12-d265-d863-2554-08602b5d913b@gmail.com> Date: Mon, 12 Nov 2018 14:00:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0340BD5951FC571056F96D55" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------0340BD5951FC571056F96D55 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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. > > On Mon, Nov 12, 2018 at 2:28 PM Rob Sargent > wrote: > > > On 11/12/18 11:44 AM, 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 > > > > In this case, does the "General options" -f make sense? restoring > to a file? > > If the top post it to my question about -f making sense, I was responding to Tom's explanation.  He's correct of course. I'm just wondering if pg-restore --help should include -f from the general options.  I probable should have posed this to Joshua's reply. --------------0340BD5951FC571056F96D55 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


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.

On Mon, Nov 12, 2018 at 2:28 PM Rob Sargent <robjsargent@gmail.com> wrote:

On 11/12/18 11:44 AM, Tom Lane wrote:
> David <dlbarron28@gmail.com> 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 <predata.sql
>
>                       regards, tom lane
>

In this case, does the "General options" -f make sense? restoring to a file?


If the top post it to my question about -f making sense, I was responding to Tom's explanation.  He's correct of course. I'm just wondering if pg-restore --help should include -f from the general options.  I probable should have posed this to Joshua's reply.
--------------0340BD5951FC571056F96D55--