Point in Time Recovery WAS: Hot Backup

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Sandeep Chadha <sandeep(at)newnetco(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Point in Time Recovery WAS: Hot Backup
Date: 2002-10-09 16:19:26
Message-ID: Pine.LNX.4.33.0210090949280.27753-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi Sandeep. What you were calling Hot Backup is really called Point in
Time Recovery (PITR). Hot Backup means making a complete backup of the
database while it is running, something Postgresql has supported for a
very long time.

On Mon, 7 Oct 2002, Sandeep Chadha wrote:

> Hello to all the Doers of Postgres!!!
>
> Last time I went through forums, people spoke highly about 7.3 and its
> capability to do hot backups. My problem is if the database goes down
> and I lose my main data store, then I will lose all transactions back
> to the time I did the pg_dump.

Let's make it clear that this kind of failure is EXTREMELY rare on real
database servers since they almost ALL run their data sets on RAID arrays.
While it is possible to lost >1 drive at the same time and all your
database, it is probably more likely to have a bad memory chip corrupt
your data silently, or a bad query delete data it shouldn't.

That said, there IS work ongoing to provide this facility for Postgresql,
but I would much rather have work done on making large complex queries run
faster, or fix the little issues with foreign keys cause deadlocks.

> Other databases (i e Oracle) solves this by retaining their archive
> logs in some physically separate storage. So, when you lose your data,
> you can restore the data from back-up, and then apply your archive log,
> and avoid losing any committed transactions.
>
> > Postgresql has been lacking this all along. I've installed postgres
> 7.3b2 and still don't see any archive's flushed to any other place.
> Please let me know how is hot backup procedure implemented in current
> 7.3 beta(2) release.

Again, you'll get better response to your questions if you call it "point
in time recovery" or pitr. Hot backup is the wrong word, and something
Postgresql DOES have.

It also supports WALs, which stands for Write ahead logs. These files
store what the database is about to do before it does it. Should the
database crash with transactions pending, the server will come back up and
process the pending transactions that are in the WAL files, ensuring the
integrity of your database.

Point in Time recovery is very nice, but it's the last step in many to
ensure a stable, coherent database, and will probably be in 7.4 or
somewhere around there. If you're running in a RAID array, then the loss
of your datastore should be a very remote possibility.

In response to

  • Hot Backup at 2002-10-07 17:21:06 from Sandeep Chadha

Browse pgsql-general by date

  From Date Subject
Next Message Hector Galicia 2002-10-09 16:40:53 query
Previous Message Bruce Momjian 2002-10-09 16:16:44 Re: OPERATORS

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-09 16:20:02 Re: [HACKERS] pg_dump and inherited attributes
Previous Message Sir Mordred The Traitor 2002-10-09 15:24:45 Re: Just a thought