Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aZKLB-0002fj-9I for pgsql-admin@arkaria.postgresql.org; Fri, 26 Feb 2016 15:30:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aZKLA-0008Ii-SW for pgsql-admin@arkaria.postgresql.org; Fri, 26 Feb 2016 15:30:00 +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) (envelope-from ) id 1aZKLA-0008Ib-4P for pgsql-admin@postgresql.org; Fri, 26 Feb 2016 15:30:00 +0000 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aZKL7-0005f1-AI for pgsql-admin@postgresql.org; Fri, 26 Feb 2016 15:29:58 +0000 Received: by mail-qg0-x22f.google.com with SMTP id b67so67569921qgb.1 for ; Fri, 26 Feb 2016 07:29:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openscg-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=XkZetZJLM/SXoPBj0YWN1s+apFzbreKtNQnpZngfea4=; b=OVXgdLI39r+wy+rE+KRC/zBvYBG8k+6kYGRioHCh+AxpnqNZU9Jr0pCeS55EUY/DNn 7wHRGjBBogIm1lhfPpEkd6UfK9laYRueNO1qFObEIirQX2GXeFyYL26r41cZJi9QZXfv gugsz5pM84kTUkEZkmvJNAXqphNHtPPQnL4/jMj4KTWYSCfHJTT/kyNv5UV6u/nL5ufO xJFrnE08I8fTo8hdWUgUNoJT9FEy3d7lyRvtfL190yukhgALuQ84E+kvfrA+hipmK9He LJBdKI3epsipy3rDfw//q0yrJgibYGbS58NrDvC69vlOLyeODExJlYD/jTHRW8tga9dF 2drg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=XkZetZJLM/SXoPBj0YWN1s+apFzbreKtNQnpZngfea4=; b=he0BDBxAkK1fzonIbvrOJKQhdQnwWSTZ6P0uvktFo4F2bItfqUmyxZotY+7pFv1aRF 9lanS+CnOwkcZ+uF+hypdR14D4bi6fu9FAHrRdfSs4wT5IEgQL9Z+arLrmjriycMOY53 POZmCJq8pRxWA1hjrayAOmXcUX45izzCjOalqT5oJSjhnm1TZkgcIBQHvO4NToihqjQs Y0q7cFOJoKNhiG0i7KdxWVW9zPy+xNdbpFkzv8zlKH18zjLyqEp/pWVOITwlET6SCpjt gMsy7IinCwqv6orFekONaHldMY76n2z35JuXRfnBRbhigdxmCkVpVNAjaWHU82dDk9tq UwDw== X-Gm-Message-State: AD7BkJKL731/3J2AgMT/dG6t5t+1WdS7ZS/Uniy+2weOa0dpbUemTspBocWgVKir7gModpbM X-Received: by 10.140.157.214 with SMTP id d205mr2836318qhd.3.1456500595998; Fri, 26 Feb 2016 07:29:55 -0800 (PST) Received: from [10.30.6.92] (cpe-66-67-62-5.rochester.res.rr.com. [66.67.62.5]) by smtp.gmail.com with ESMTPSA id r132sm5449206qhc.41.2016.02.26.07.29.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Feb 2016 07:29:55 -0800 (PST) Subject: Re: pg_restore - Real dump file size To: pgsql-admin@postgresql.org References: From: Scott Mead Message-ID: <56D06F72.3000604@openscg.com> Date: Fri, 26 Feb 2016 10:29:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------050808010504010900030301" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --------------050808010504010900030301 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 02/26/2016 12:19 AM, drum.lucas@gmail.com wrote: > sorry I was going to send it to the general list.. but I've sent to > admin by mistake > > > I've sent to general list now > > > On 26 February 2016 at 17:25, drum.lucas@gmail.com > > wrote: > > Hi all, > > > I'm doing the pg_restore now in a 1.5TB file: > > *# ls -la* > > postgres postgres 1575324616939 Feb 20 13:55 devdb_0.sql > > But, the restore has gone over 1.6 TB > > *# \l+* > > 1639 GB > > > How is that even possible? > The dump itself doesn't contain index data. It'll contain a line that says 'CREATE INDEX .....' The index is an on-disk entity that requires disk space, it's very common for a dump file and a restored database to very significantly in size. > > *pg_restore command:* > > /usr/pgsql-9.2/bin/pg_restore -d dbname --exit-on-error --jobs=4 > --verbose devdb_0.sql > > Cheers > > -- Scott Mead OpenSCG http://www.openscg.com PostgreSQL, Java & Linux Experts --------------050808010504010900030301 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 02/26/2016 12:19 AM, drum.lucas@gmail.com wrote:
sorry I was going to send it to the general list.. but I've sent to admin by mistake


I've sent to general list now


On 26 February 2016 at 17:25, drum.lucas@gmail.com <drum.lucas@gmail.com> wrote:
Hi all,


I'm doing the pg_restore now in a 1.5TB file:

# ls -la

postgres postgres 1575324616939 Feb 20 13:55 devdb_0.sql

But, the restore has gone over 1.6 TB

# \l+

1639 GB


How is that even possible?


The dump itself doesn't contain index data.  It'll contain a line that says 'CREATE INDEX .....'
   The index is an on-disk entity that requires disk space, it's very common for a dump file and a restored database to very significantly in size.


pg_restore command:

/usr/pgsql-9.2/bin/pg_restore -d dbname --exit-on-error --jobs=4 --verbose devdb_0.sql

Cheers



--
Scott Mead
OpenSCG
http://www.openscg.com
PostgreSQL, Java & Linux Experts
--------------050808010504010900030301--