Re: Transaction ID not logged if no explicit transaction used - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Transaction ID not logged if no explicit transaction used
Date
Msg-id 20160215163654.GA641029@alvherre.pgsql
Whole thread Raw
In response to Re: Transaction ID not logged if no explicit transaction used  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Mart�n Marqu�s wrote:
> >> This really gives little use for recovery_target_xid. :(
>
> > Hmm, you can still use pg_xlogdump to figure it out from the actual WAL,
> > which has the correct XIDs.  It's obviously a worse solution though from
> > the user's POV, because it's hard to figure out what WAL record
> > corresponds to the change you care about ...
>
> To what extent does the commit_ts infrastructure fix this?

I don't think it does at all.  You could try to find out the XID using a
timestamp you obtain from the log file (knowing that the lookups are the
opposite way, i.e. you give it an XID and it returns a timestamp); but
if that's the scenario, I think it's simpler to use the timestamp in
recovery_target_time directly.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-general by date:

Previous
From: Augori
Date:
Subject: Re: Trouble installing PostGIS on Amazon Linux server
Next
From: Pierre HILBERT
Date:
Subject: Re: Trouble installing postgresql server on Amazon Linux