Skip site navigation (1) Skip section navigation (2)

Re: dbsize & pg_dump

From: "Jason Minion" <jason(dot)minion(at)sigler(dot)com>
To: "mcelroy, tim" <tim(dot)mcelroy(at)bostonstock(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: dbsize & pg_dump
Date: 2006-04-25 21:47:53
Message-ID: 261CF9EEB14F5442894AB6DDA93AA6F4283AEB@mail.siglercompanies.com (view raw or flat)
Thread:
Lists: pgsql-admin
Usually a dump is significantly smaller than a live database due to
space taken up by indexes and discarded tuples from MVCC. If it's
significantly smaller you may also want to take a look at your vacuuming
procedure.

But I'm not sure database_size() is. 

Jason Minion
jason(dot)minion(at)sigler(dot)com


________________________________

From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of mcelroy, tim
Sent: Tuesday, April 25, 2006 4:06 PM
To: 'pgsql-admin(at)postgresql(dot)org'
Subject: Re: [ADMIN] dbsize & pg_dump



Please disregard this question.  I'm using pg_dump -F c which compresses
the data a it backs it up.

 

Tim

 

 

-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of mcelroy, tim
Sent: Tuesday, April 25, 2006 4:40 PM
To: 'pgsql-admin(at)postgresql(dot)org'
Subject: [ADMIN] dbsize & pg_dump

 

Good afternoon,

Probably an easy question but why are the file sizes differ so much
between these two tools?

For example:  

A backup using pg_dump of our largest DB creates a file 384MB in size

Using the following SQL code utilizing dbsize I get the following:

FIX1=# SELECT D1.pg_size_pretty AS "FIX1_DB_SIZE"

FIX1-# FROM (SELECT pg_size_pretty(database_size('FIX1'))) D1;

 FIX1_DB_SIZE

--------------

 3832 MB

(1 row)

Is it safe to assume that pg_dump does a compression of the data?

Thanks

Tim


Responses

pgsql-admin by date

Next:From: John DeSoiDate: 2006-04-26 04:55:47
Subject: Re: Invalid UTF8 & Large Objects
Previous:From: mcelroy, timDate: 2006-04-25 21:06:24
Subject: Re: dbsize & pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group