Re: DB size difference after restore

2018-10-03 Thread Chris Travers
On Wed, Oct 3, 2018 at 2:59 PM Sonam Sharma wrote: > > > On Wed, Oct 3, 2018 at 6:21 PM Sonam Sharma wrote: > >> Hello Ben, >> >> When we do \l+ , it is different than source, when we load backup from >> target server. >> >Backup is taken using pg_dump and its loaded as psql db name > It'

Re: DB size difference after restore

2018-10-03 Thread Sonam Sharma
On Wed, Oct 3, 2018 at 6:21 PM Sonam Sharma wrote: > Hello Ben, > > When we do \l+ , it is different than source, when we load backup from > target server. > Backup is taken using pg_dump and its loaded as psql db name > > Regards, > > Sonam > > > > > > > On Wed, Oct 3, 2018 at 6:17 PM Benj

Re: DB size difference after restore

2018-10-03 Thread Fabio Pardi
Hi Sonam, it is common that after an export (pg_dump) and a consecutive import, the new database uses less space than the old one. Under some circumstances, indexes can become unbalancedor bloated, and tables bloated. And that uses more space than it should. for the sake of trying it out: If y

Re: DB size difference after restore

2018-10-03 Thread Sonam Sharma
Hello Ben, When we do \l+ , it is different than source, when we load backup from target server Regards, Sonam On Wed, Oct 3, 2018 at 6:17 PM Benjamin Scherrey wrote: > If you're talking about space on drive then you can expect the new one to > be smaller generally as it has been straig

Re: DB size difference after restore

2018-10-03 Thread Benjamin Scherrey
If you're talking about space on drive then you can expect the new one to be smaller generally as it has been straight efficient writes rather than a bunch of updates and deletes which create "holes" in the physical file space. It helps if you are more detailed as to what you've observed if you wa

DB size difference after restore

2018-10-03 Thread Sonam Sharma
I have restored the database from backup dump but the size of source and target databases are different. What can be the reason for this ? Regards, Sonam