From: Vladimir Gordiychuk <folyga@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: [pgjdbc/pgjdbc] 170d9c: Bug: Not valid calculate lastReceiveLSN for logica...
Date: Fri, 07 Apr 2017 03:42:44 -0700
Message-ID: <58e76d24a2e5_14413f893cf3fc3c17723c@hookshot-fe5-cp1-prd.iad.github.net.mail> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: 170d9c27810349456e56aff1c36a0ad6584b9e28
https://github.com/pgjdbc/pgjdbc/commit/170d9c27810349456e56aff1c36a0ad6584b9e28
Author: Vladimir Gordiychuk <folyga@gmail.com>
Date: 2017-04-07 (Fri, 07 Apr 2017)
Changed paths:
M pgjdbc/src/main/java/org/postgresql/core/v3/replication/V3PGReplicationStream.java
M pgjdbc/src/main/java/org/postgresql/core/v3/replication/V3ReplicationProtocol.java
A pgjdbc/src/main/java/org/postgresql/replication/ReplicationType.java
M pgjdbc/src/test/java/org/postgresql/replication/LogicalReplicationStatusTest.java
M pgjdbc/src/test/java/org/postgresql/replication/LogicalReplicationTest.java
M pgjdbc/src/test/java/org/postgresql/replication/PhysicalReplicationTest.java
Log Message:
-----------
Bug: Not valid calculate lastReceiveLSN for logical replication (#801)
* Bug: Not valid receiveLSN that lead to lost parallel transactions
Add test that reproduce issue from
https://www.postgresql.org/message-id/CAHHbV7V4XvdHGw_jpR9Xyq3fz%3Df%2BO4oa%2B73sbizGTv_AvmDXhQ%40ma...
* bug: lastReceiveLSN not valid for logical replication
Logical and Physical replication use different algorithms
to calculate the lastReceiveLSN.
For physical replication the calculation is:
startLsn from XLogData plus the payloadsize; this is correct as we have the raw data.
For logical replication the lastReceiveLSN uses startLSN from XLogData without the payload size as payload size is not available as a result logical decoding message size
can change and we get LSN from the future random future transaction.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: folyga@gmail.com
Subject: Re: [pgjdbc/pgjdbc] 170d9c: Bug: Not valid calculate lastReceiveLSN for logica...
In-Reply-To: <58e76d24a2e5_14413f893cf3fc3c17723c@hookshot-fe5-cp1-prd.iad.github.net.mail>
References: <58e76d24a2e5_14413f893cf3fc3c17723c@hookshot-fe5-cp1-prd.iad.github.net.mail>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox