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 20160211231208.GA492564@alvherre.pgsql
Whole thread Raw
In response to Re: Transaction ID not logged if no explicit transaction used  (Martín Marqués <martin@2ndquadrant.com>)
Responses Re: Transaction ID not logged if no explicit transaction used  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Martín Marqués wrote:
> El 10/02/16 a las 21:46, Tom Lane escribió:

> > We could maybe fix this by redefining %x as "the current or most recent
> > xid", so that it'd still be valid for messages issued post-commit.
> > But I'm afraid that would add about as many bad behaviors as it would
> > remove.  In your example above, that would result in a pretty misleading
> > xid attached to the "begin" statement, since at that point we have
> > started a new transaction but not assigned it any xid.
>
> 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 ...

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


pgsql-general by date:

Previous
From: Martín Marqués
Date:
Subject: Re: Transaction ID not logged if no explicit transaction used
Next
From: Tom Lane
Date:
Subject: Re: Transaction ID not logged if no explicit transaction used