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

Re: Differential backup

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Differential backup
Date: 2010-04-28 03:15:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Simon Riggs wrote:

> Is this route worthwhile? Or in some way unacceptable?

From an admin perspective, I think block-level differentials would be a
lot more useful, especially if index storage could be safely excluded.

IMO Pg really could use an "index bad or missing, rebuild on postmaster
start" flag so that indexes could simply be omitted from backups and
would be automatically REINDEXed on startup. That'd be *great* for
pg_start_backup() / pg_stop_backup() filesystem level backups,
especially if indexes were configured to live in another tablespace.

Another avenue possibly worth investigating may be using the in-heap
mvcc information to do SQL-level differential backups of individual
tables or of the whole database. think:

    pg_dump --incremental --last-backup-id '10296:10296:'

where "--last-backup-id" is the output of "select
txid_current_snapshot()" from the last backup, and could possibly be
fished out of a header in the previous dump.

This would be *incredibly* handy for people who have one database in a
that's more important than another and needs long-term history storage,
but for whom PITR is a PITA because it's whole-cluster-or-nothing.

This is trivial to do for individual append-only tables. I was trying to
figure out how to handle updates/deletes but quickly found myself
completely stumped.

I'd be surprised if this hasn't been looked at and put in the
"impossible" or "too hard" pile, but thought it was worth mentioning on
the off chance.

Craig Ringer

Tech-related writing:

In response to


pgsql-hackers by date

Next:From: Takahiro ItagakiDate: 2010-04-28 04:02:16
Subject: Re: Add column if not exists (CINE)
Previous:From: Fujii MasaoDate: 2010-04-28 02:43:59
Subject: Re: Wierd quirk of HS/SR, probably not fixable

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