Re: PITR - recovery to a particular transaction - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: PITR - recovery to a particular transaction
Date
Msg-id 1091646305.31602.3099.camel@linda
Whole thread Raw
In response to Re: PITR - recovery to a particular transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PITR - recovery to a particular transaction  (Rod Taylor <pg@rbt.ca>)
Re: PITR - recovery to a particular transaction  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Wed, 2004-08-04 at 19:16, Tom Lane wrote:
> Oliver Elphick <olly@lfix.co.uk> writes:
> > How about adding a logging option to put the transaction id on the log
> > for every statement that modifies the database?  Would that be a small
> > enough change to be allowed into 8.0?
> 
> I think we could get away with adding transaction ID as one of the
> available %-items in log_line_prefix.  I'm not sure how useful this
> really is though --- timestamps are probably more useful overall to
> have in your log.

Why not both?

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
happened at time x so do PITR up to x - 1 second"; the latter might miss
several tranactions.  Have I got the concepts wrong here?

>   The direction I was expecting we'd head in is to
> provide WAL logfile examination tools.

But that's not going to happen for 8.0, so any means of getting the
transaction id is better than none.

-- 
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
========================================   "And not only so, but we glory in tribulations also;      knowing that
tribulationworketh patience; And       patience, experience; and experience, hope."
           Romans 5:3,4 
 



pgsql-hackers by date:

Previous
From: Kris Jurka
Date:
Subject: Re: postgres and Jdbc 2.0
Next
From: Rod Taylor
Date:
Subject: Re: PITR - recovery to a particular transaction