Re: PATCH: 9.5 replication origins fix for logical decoding

From: Andres Freund <andres(at)anarazel(dot)de>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: 9.5 replication origins fix for logical decoding
Date: 2015-10-15 12:55:36
Message-ID: 20151015125536.GE6851@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-10-15 20:52:41 +0800, Craig Ringer wrote:
> You'll note that the tests fail. When the replication origin is reset
> and set again with pg_replication_origin_xact_setup mid-xact, the
> origin identity exposed to the decoding plugin callbacks for all
> records (including those created before the origin change) is the
> latter origin, the one active at COMMIT time.
>
> Is that the intended behaviour? That the session identifier is
> determined by what was active at commit time, and only the lsn and
> timestamp vary throughout the xact? It looks like it from the code.

Uh. Isn't that just because you looked at txn->origin_id instead of the
change's origin_id?

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-10-15 13:22:32 Re: Parallel Seq Scan
Previous Message Craig Ringer 2015-10-15 12:52:41 Re: PATCH: 9.5 replication origins fix for logical decoding