Re: PITR - recovery to a particular transaction

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: olly(at)lfix(dot)co(dot)uk, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PITR - recovery to a particular transaction
Date: 2004-08-04 21:13:51
Message-ID: 200408042113.i74LDp503828@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rod Taylor wrote:
> > You seem to be suggesting that using the id is less useful than the
> > time, but surely it's going to be easier to say "this disaster happened
> > in transaction 123 so lets do a PITR up to 122" than to say "this
>
> Transaction IDs are assigned at transaction start but what you really
> want is some indicator of when the commit occurred.
>
> Transaction 123 may have committed while 122 was still running.

True. In fact this brings up a problem of using the xid for recovery
stop. The interesting point is that you might recover to just before
xact 123, but that doesn't mean you get xact 122.

Still I think we need to add xid to the log_line_prefix for PITR and
make it clear that specifying a recovery xid doesn't always include
earlier xids. I have added this to the open items list.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2004-08-04 21:38:41 Timezone for %t log_line_prefix
Previous Message Tom Lane 2004-08-04 21:08:11 Re: Timezone for %t log_line_prefix