Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFRmW-0006fw-VD for pgsql-general@arkaria.postgresql.org; Thu, 16 Nov 2017 21:33:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eFRmW-0007Fa-Cs for pgsql-general@arkaria.postgresql.org; Thu, 16 Nov 2017 21:33:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eFRmV-0007FQ-H4 for pgsql-general@postgresql.org; Thu, 16 Nov 2017 21:33:07 +0000 Received: from eastrmfepo101.cox.net ([68.230.241.213]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eFRmS-0008T2-PN for pgsql-general@postgresql.org; Thu, 16 Nov 2017 21:33:06 +0000 Received: from eastrmimpo110.cox.net ([68.230.241.223]) by eastrmfepo101.cox.net (InterMail vM.8.01.05.28 201-2260-151-171-20160122) with ESMTP id <20171116213303.SAFG4075.eastrmfepo101.cox.net@eastrmimpo110.cox.net> for ; Thu, 16 Nov 2017 16:33:03 -0500 Received: from [192.168.1.10] ([70.171.109.83]) by eastrmimpo110.cox.net with cox id alZ31w00H1o04Vy01lZ3bW; Thu, 16 Nov 2017 16:33:03 -0500 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020206.5A0E040F.00FF,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.2 cv=ENR26xRC c=1 sm=1 tr=0 a=uCHdjGDeLqaieW9t8IbZ6A==:117 a=uCHdjGDeLqaieW9t8IbZ6A==:17 a=x7bEGLp0ZPQA:10 a=T11QR6bd6vIA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=kviXuzpPAAAA:8 a=eDxzlA4PUHwFf39kxEAA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=5VOvv-vcf8L4Pxuufk8A:9 a=Aj0hRDSWXXbnNxZl:21 a=_W_S_7VecoQA:10 a=qrIFiuKZe2vaD64auk6j:22 X-CM-Score: 0.00 Authentication-Results: cox.net; auth=pass (PLAIN) smtp.auth=ron.l.johnson@cox.net Subject: Re: pg_restore load data To: pgsql-general@postgresql.org References: <8f75fd9b-8ba9-8bfb-cac6-3c0f33d2b760@cox.net> From: Ron Johnson Message-ID: Date: Thu, 16 Nov 2017 15:33:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------75581EDD45F759AEF1C6248A" Content-Language: en-US List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org This is a multi-part message in MIME format. --------------75581EDD45F759AEF1C6248A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 11/16/2017 03:13 PM, bricklen wrote: > > On Thu, Nov 16, 2017 at 1:07 PM, Ron Johnson > wrote: > > v9.2.7  (Yes, I know, it's old.  Nothing I can do about it.) > > During a "whole database" restore using pg_restore of a custom dump, > when is the data actually loaded?  I've looked in the list output and > don't see any "load" statements. > > > Look for COPY lines, that's how the data is restored. $ pg_restore -l CDSHA01.dump > CDSHA01.txt $ grep --color -i copy CDSHA01.txt $ echo $? 1 There are lots of "restoring data", though.  I should have thought to grep for that. One thing that puzzles me is how fast the tables (even large ones) loaded compared to how slow the pg_dump -Fc was.  Granted, I'm running -j4 but still, these were some really large, poorly compressible tables (the dump file was about as big as du -mc data/base). -- World Peace Through Nuclear Pacification --------------75581EDD45F759AEF1C6248A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 11/16/2017 03:13 PM, bricklen wrote:

On Thu, Nov 16, 2017 at 1:07 PM, Ron Johnson <ron.l.johnson@cox.net> wrote:
v9.2.7  (Yes, I know, it's old.  Nothing I can do about it.)

During a "whole database" restore using pg_restore of a custom dump, when is the data actually loaded?  I've looked in the list output and don't see any "load" statements.

Look for COPY lines, that's how the data is restored.

$ pg_restore -l CDSHA01.dump > CDSHA01.txt
$ grep --color -i copy CDSHA01.txt

$ echo $?
1

There are lots of "restoring data", though.  I should have thought to grep for that.

One thing that puzzles me is how fast the tables (even large ones) loaded compared to how slow the pg_dump -Fc was.  Granted, I'm running -j4 but still, these were some really large, poorly compressible tables (the dump file was about as big as du -mc data/base).

-- 
World Peace Through Nuclear Pacification
--------------75581EDD45F759AEF1C6248A--