From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: database size changed after restoring using pg_restore |
Date: | 2017-11-08 23:24:55 |
Message-ID: | 6ace5144-1c71-18fa-e1a2-2341bd28c23f@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/8/2017 2:59 PM, Dylan Luong wrote:
>
> Hi
>
> I am upgrading some databases from a PostgreSQL 9.2 server to a new
> PostgreSQL 9.6 server.
>
> I used pg_dump and pg_restore for the upgrade.
>
> .....
>
> But when I listed the size of the database (postgres=# \l+) between
> the 9.2 and the upgraded 9.6, they were different.
>
> on 9.2 it was 3776 MB
> on 9.6 it was 1570 MB
>
> I also did a few more databases using the same steps and they all
> appeared to be smaller. Is that normal?
yes. a freshly restored database will be all contiguous with no
embedded free tuples left over from operations. databases that get
updates (or inserts/deletes) tend to bloat.
--
john r pierce, recycling bits in santa cruz
From | Date | Subject | |
---|---|---|---|
Next Message | Igal @ Lucee.org | 2017-11-09 00:32:56 | Migrating money column from MS SQL Server to Postgres |
Previous Message | Andreas Joseph Krogh | 2017-11-08 23:23:20 | Re: database size changed after restoring using pg_restore |