Re: Logical replication origin tracking fix

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: Logical replication origin tracking fix
Date: 2017-04-04 12:37:50
Message-ID: 69ff9da5-0ebc-cadd-c405-997349370b51@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/24/17 10:48, Petr Jelinek wrote:
> On 10/03/17 05:59, Petr Jelinek wrote:
>> while discussing with Craig issues around restarting logical replication
>> stream related to the patch he posted [1], I realized that we track
>> wrong origin LSN in the logical replication apply.
>>
>> We currently track commit_lsn which is *start* of commit record, what we
>> need to track is end_lsn which is *end* of commit record otherwise we
>> might request transaction that was already replayed if the subscription
>> instance has crashed right after commit.
>>
>> Attached patch fixes that.
>>
>
> Rebase after table copy patch got committed.

committed

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-04-04 12:40:11 Re: Logical replication SnapBuildInitalSnapshot spelling
Previous Message Stephen Frost 2017-04-04 12:30:12 Re: Rewriting the test of pg_upgrade as a TAP test