Re: PG and undo logging

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ravi Krishna <sravikrishna3(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PG and undo logging
Date: 2015-05-23 23:46:10
Message-ID: CAKFQuwZdZhmKhH=du=1Xo2tUgbaukEuf4Zmk47MaT-AGx3k6RQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Saturday, May 23, 2015, Ravi Krishna <sravikrishna3(at)gmail(dot)com> wrote:

> undo means that reading the WAL logs and able to rollback a row back
> to its original state before the update. Typically it is used to
> rollback a long running transaction which got aborted due to a crash.
> Here is an example:
>
>
Not an expert here but...

It doesn't matter why the newly written data was deemed invalid, MVCC
ensures that absent a successful commit all of that data is considered
invisible to anything other than the session writing the data. Eventually
vacuum is needed to cleanup the dead data.

One possible implementation is that uncommitted data simply is never
written to the data files...only the buffers see the changes until commit
when the WAL sees it. This seems likely but I do not know for sure.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Begin 2015-05-24 01:46:01 Re: FW: Constraint exclusion in partitions
Previous Message Adrian Klaver 2015-05-23 23:38:05 Re: Trying to solve a SocketError [Errno 13] Permission with PL/Python in PostgreSQL 9.3