Re: Backing up postgresql database

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-admin(at)postgresql(dot)org>,"Jakov Sosic" <jakov(dot)sosic(at)srce(dot)hr>
Subject: Re: Backing up postgresql database
Date: 2009-03-04 14:49:43
Message-ID: 49AE40A7.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>>> Jakov Sosic <jakov(dot)sosic(at)srce(dot)hr> wrote:
> How do you mean, do fewer updates?

Well, without knowing the application it's hard for me to say; but, as
a guess, perhaps the application could be modified to accumulate, say,
a minute's worth of data and update it in summary, rather than
updating each sample once per second. That would leave you vulnerable
to losing up to a minute's worth of data, but would cut the rate of
WAL generation to less than 2% of its current rate.

> And what do you mean by keeping WAL's for less time?

Do base backups more frequently. If you need to keep more than two
base backup's worth, only keep "snapshots" of older backups -- just
the base and enough WAL files to cover the range specified in the
*.backup file generated by the start and stop functions run during the
base backup.

> I've read about gziping WAL's, and I will do it offcourse, but that
> only makes problem a little smaller, doesn't solve it :)

Well, cutting the scope of a problem by two thirds is sometimes
enough. If you combine that with the summary updates mentioned above,
you might reduce the space needed to store WAL files to less than 1%
of current requirements. Judicious use of the snapshot technique
could let you keep a few snapshots going back 90 days and only require
a small fraction of 1% of what you're thinking it will take based on
current numbers.

-Kevin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Carol Walter 2009-03-04 15:05:35 Re: Database in use?
Previous Message Jan-Peter.Seifert 2009-03-04 14:41:22 Re: getting 'full' names of functions?