Re: [GENERAL] database size changed after restoring using pg_restore

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: [GENERAL] database size changed after restoring using pg_restore
Дата
Msg-id 6ace5144-1c71-18fa-e1a2-2341bd28c23f@hogranch.com
обсуждение исходный текст
Ответ на [GENERAL] database size changed after restoring using pg_restore  (Dylan Luong <Dylan.Luong@unisa.edu.au>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: [GENERAL] database size changed after restoring usingpg_restore
Следующее
От: "Igal @ Lucee.org"
Дата:
Сообщение: [GENERAL] Migrating money column from MS SQL Server to Postgres