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

restoring from pg_dumpall

From: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: restoring from pg_dumpall
Date: 2008-07-24 19:32:54
Message-ID: B0D7C0A3F35FE144A70312D086CBCA9B0CF2B433@ExchMailbox2.univ.dir.wwu.edu (view raw or flat)
Thread:
Lists: pgsql-admin
If I restore all the postgresql databases from pg_dumpall and use the -c to drop databases before restoring them the size of the base directory dramatically increases with each restore (193MB to 355MB to 624MB). If I run vacuumdb, it only drops by a few MB.

If I do the long process by:
1. stopping the postmaster
2. deleting all contents in the data folder
3. run initdb -D /var/lib/pgsql/data
4. start the postmaster
5. restore of all databases from the same pg_dumpall
the size of the base directory does not balloon.

I have searched online for optimized backup and restore procedures for postgresql, so far all I have found are the postgresql.org documents which are a little vague on the subject.

I must assume there is a better method than my long process that does not bloat the size of the base directory (the databases) as the -c flag seems to do.

Marc


pgsql-admin by date

Next:From: Chris BovitzDate: 2008-07-24 19:51:03
Subject: Re: Upgrade clients when (major) upgrading server?
Previous:From: Scott MarloweDate: 2008-07-24 18:06:11
Subject: Re: Upgrade clients when (major) upgrading server?

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