[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] pg_restore load data
From:       Ron Johnson <ron.l.johnson () cox ! net>
Date:       2017-11-16 21:33:03
Message-ID: ae75ba0c-6222-6d2d-dbb5-0274e2ea0385 () cox ! net
[Download RAW message or body]

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 
> <mailto: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


[Attachment #3 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11/16/2017 03:13 PM, bricklen wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGrpgQ8XwhkCwbvwRLQ8SzJspVOY3gpeNDBLcuPDEdnsvvb4tA@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Thu, Nov 16, 2017 at 1:07 PM, Ron
            Johnson <span dir="ltr">&lt;<a
                href="mailto:ron.l.johnson@cox.net" target="_blank"
                moz-do-not-send="true">ron.l.johnson@cox.net</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              v9.2.7  (Yes, I know, it's old.  Nothing I can do about
              it.)<br>
              <br>
              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.<br>
            </blockquote>
          </div>
        </div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">Look for COPY lines, that's how the
          data is restored.</div>
      </div>
    </blockquote>
    <br>
    <tt>$ pg_restore -l CDSHA01.dump &gt; CDSHA01.txt<br>
      $ grep --color -i copy CDSHA01.txt</tt><tt><br>
    </tt><tt>$ echo $?</tt><tt><br>
    </tt><tt>1</tt><tt><br>
    </tt><br>
    There are lots of "restoring data", though.  I should have thought
    to grep for that.<br>
    <br>
    One thing that puzzles me is how fast the tables (even large ones)
    loaded compared to how slow the <tt>pg_dump -Fc</tt> was.  Granted,
    I'm running <tt>-j4</tt> but still, these were some really large,
    poorly compressible tables (the dump file was about as big as <tt>du
      -mc data/base</tt>).<br>
    <br>
    <pre class="moz-signature" cols="76">-- 
World Peace Through Nuclear Pacification</pre>
  </body>
</html>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic