]> granicus.if.org Git - postgresql/commit
Fix remote position tracking in logical replication
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 4 Apr 2017 12:24:32 +0000 (08:24 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 4 Apr 2017 12:24:32 +0000 (08:24 -0400)
commitfe7bbc4ddb82c635ef08b5eadc5ce472ad515996
tree36511b95c6a0d9e3cc9faff6aa273d233ffb8608
parentb38006ef6d1ba2f56cc4962ed17956b74c9fa0c4
Fix remote position tracking in logical replication

We need to set the origin remote position to end_lsn, not commit_lsn, as
commit_lsn is the start of commit record, and we use the origin remote
position as start position when restarting replication stream.  If we'd
use commit_lsn, we could request data that we already received from the
remote server after a crash of a downstream server.

Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
src/backend/replication/logical/worker.c