Re: Backing up postgresql database

From: Jakov Sosic <jakov(dot)sosic(at)srce(dot)hr>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Backing up postgresql database
Date: 2009-03-04 00:51:24
Message-ID: 49ADD08C.3000604@srce.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Marlowe wrote:

> That might not be much smaller if you're doing a lot of updates /
> inserts / deletes. Also, SQL ain't the same as what was committed. If
> you insert now() it won't be the same when you run it in two days.

Well I think I miscalculated a little bit... It's more like a 120 GB per
day, not 5TB... I'll post correct results tommorow.

> The key here is it seems like you have a very high churn rate, and if
> you're backup solution involves saving all those changes and applying
> them later, it's gonna incur a rather large storage use.
>
> I.e. PITR, as you have it implemented, might not be your best solution.

> You might be better off with something like Slony, Burcado (sp?) or
> another of other live replication setups that don't have the same
> issues you're seeing here.

Replication involves another machine, and more load on current one, and
that's not what I want.

> It's probably better to keep pg_dump type backups for those types of
> things. pitr is a poor challenger to the easily compressed output of
> pg_dump for offsite backups. Especially over a wire.

But how long would pg_dump execute on DB with this volume of traffic?
And would it kill the machine in that period? I can try that as well
tommorow...

> If I update a single row in a database 1,000,000,000 times, how man
> WAL files will you need?
> If you update every row in a 1,000,000,000 row database, how many WAL
> files will you need?

Obviously application is not just appending new data, as I thought
before... Because appends (aka INSERT) wouldn't cause this volume of
WAL's or would it?

> I'm wondering what you're objectives are in your backup strategy, it
> might be you're coming at it one way when we'd all approach it from
> another way. Or not.

You are correct on this one. DB I'm talking about is not that important
to have rigorous backup schedule and recovery policies. I rather have
hardware limitations and I have to find the best solution to not
overutilize the hardware and in the same time have as frequent backups
as possible.

--
| Jakov Sosic | ICQ: 28410271 | PGP: 0x965CAE2D |
=================================================================
| start fighting cancer -> http://www.worldcommunitygrid.org/ |

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2009-03-04 01:26:51 Re: Backing up postgresql database
Previous Message Scott Marlowe 2009-03-04 00:22:46 Re: Backing up postgresql database