Re: Transaction ID not logged if no explicit transaction used

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Martín Marqués <martin(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transaction ID not logged if no explicit transaction used
Date: 2016-02-11 23:12:08
Message-ID: 20160211231208.GA492564@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-02-12 00:29:02 Re: Transaction ID not logged if no explicit transaction used
Previous Message Martín Marqués 2016-02-11 22:42:22 Re: Transaction ID not logged if no explicit transaction used