Thread: Backup 7.3 was 19GB, restored on 8.0.3 was only 4GB

Backup 7.3 was 19GB, restored on 8.0.3 was only 4GB

From
David Wall
Date:
I can't see anything wrong with my database, but I was wondering what it 
might all mean.

Under my 7.3 database, before upgrading to 8.0, I did the following:

vacuumlo my_db
reindexdb -a
vacuum analyze;
pg_dump --blobs -Fc my_73_db | gzip > dbbackup.gz

The resulting dbbackup.gz file was 19GB.

Then I moved the dbbackup.gz file to another system that had 8.0.3 
installed:

gunzip -c dbbackup.gz | pg_restore -v -O -d my_80_db

When I ran that same set of commands against the 8.0 database, the 
backup from that system was only 4GB.  I did note a large number of 
large objects were removed in the vacuumlo command, yet I can't really 
see any missing blobs, though I'm not sure how to absolutely check this.

Is there anything between the two version that would explain why one is 
so much smaller than the other?  Is there any reason why the vacuumlo 
under 7.3 didn't remove large objects that were then removed under 8.0?

Thanks,
David



Re: Backup 7.3 was 19GB, restored on 8.0.3 was only 4GB

From
Tom Lane
Date:
David Wall <d.wall@computer.org> writes:
> Is there any reason why the vacuumlo 
> under 7.3 didn't remove large objects that were then removed under 8.0?

[ digs in CVS logs ... ]  I think vacuumlo is actually entirely broken
in the 7.3 branch, because this 7.4 patch:

2002-12-09 20:57  momjian
* contrib/vacuumlo/vacuumlo.c: Following patch avoids removing oidsin the temporary table from the temporary
table.KenjiSugita
 

wasn't ever back-patched.  The former coding was assuming that temp
tables had real names of the form "pg_temp_NNN", which is no longer
true in 7.3, and the net result would be that nothing got deleted.
There were some schema-awareness bugs too, but that one would render
the whole thing a no-op.
        regards, tom lane