Re: Type of application that use PostgreSQL - Mailing list pgsql-general

From Tom Lane
Subject Re: Type of application that use PostgreSQL
Date
Msg-id 19249.1065191540@sss.pgh.pa.us
Whole thread Raw
In response to Re: Type of application that use PostgreSQL  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Responses PITR (was Re: Type of application that use PostgreSQL)  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
Shridhar Daithankar <shridhar_daithankar@persistent.co.in> writes:
> Peter Childs wrote:
>>> Postgresql do have update logs in form of WAL.

>> No it does not. WAL is Down-Date Logs not update logs. WAL will
>> enable you to rewind to the beginning of all currently running
>> transactions after a crash. Ie roll-back not roll-forward.

> Right.

Wrong.  Peter, don't state something so authoritatively when you
obviously haven't looked at the code.  Postgres does not do roll-back,
ever.  (We don't need it because of MVCC.)  We use WAL for roll
*forward* from the last checkpoint after a crash.  Any updates that
didn't make it to disk before the crash are restored from WAL.

All that we basically need for PITR is to provide management code that
lets old WAL segments get archived off to tape (or wherever) rather than
deleted, plus some kind of control that lets the roll-forward process be
stopped at the desired point-in-time rather than necessarily running to
the end of the available WAL data.  This isn't a trivial amount of code,
but there's no great conceptual difficulty either.

            regards, tom lane

pgsql-general by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: pg_restore takes ages
Next
From: Tom Lane
Date:
Subject: Re: Discussion about inheritance