From: | Hannu Krosing <hannu(at)2ndquadrant(dot)com> |
---|---|
To: | Csaba Nagy <ncslists(at)googlemail(dot)com> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, Michael Tharp <gxti(at)partiallystapled(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Differential backup |
Date: | 2010-04-28 15:58:09 |
Message-ID: | 1272470289.4685.38.camel@hvost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 2010-04-27 at 17:28 +0200, Csaba Nagy wrote:
> Hi all,
>
> On Tue, 2010-04-27 at 11:07 -0400, Merlin Moncure wrote:
> > The block level case seems pretty much covered by the hot standby feature.
>
> One use case we would have is to dump only the changes from the last
> backup of a single table. This table takes 30% of the DB disk space, it
> is in the order of ~400GB, and it's only inserted, never updated, then
> after ~1 year the old entries are archived. There's ~10M new entries
> daily in this table. If the backup would be smart enough to only read
> the changed blocks (in this case only for newly inserted records), it
> would be a fairly big win...
The standard trick for this kind of table is having this table
partitioned by insertion date - this way you have two benefits:
1) you already know which table to backup (the latest, and maye one
before that if you just switche to new one)
2) archiving will be fast (copy full latest table away and the truncate
it) instead of slow (copy "old enough" records out, then do delete of
the same records, both ow which are quite slow, and you also need to do
vacuum after that, which is also slow on large tables)
This would actually be a good sample case for tracking "latest dml",
except that in this particular corner case you can arrange for this
yourself.
--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-04-28 16:03:32 | Re: Add column if not exists (CINE) |
Previous Message | Hannu Krosing | 2010-04-28 15:52:35 | Re: Differential backup |