From af01d108865dfd33bf1da72040d914f70cf67aed Mon Sep 17 00:00:00 2001 From: Gunnar Morling Date: Tue, 15 Jan 2019 18:06:30 +0100 Subject: [PATCH] DBZ-1081 JavaDoc; adding Addison Higham to COPYRIGHT.txt --- COPYRIGHT.txt | 1 + .../connector/postgresql/connection/PostgresConnection.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 5c7785e9e..c63445b3e 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -1,4 +1,5 @@ Aaron Rosenberg +Addison Higham Akshath Patkar Amit Sela Andreas Bergmeier diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java index f6293599a..65ce21f3a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java @@ -170,6 +170,10 @@ protected ServerInfo.ReplicationSlot queryForSlot(String slotName, String databa }, map); } + /** + * Obtains the LSN to resume streaming from. On PG 9.5 there is no confirmed_flushed_lsn yet, so restart_lsn will be + * read instead. This may result in more records to be re-read after a restart. + */ private Long parseConfirmedFlushLsn(String slotName, String pluginName, String database, ResultSet rs) { Long confirmedFlushedLsn = null; @@ -182,7 +186,7 @@ private Long parseConfirmedFlushLsn(String slotName, String pluginName, String d confirmedFlushedLsn = tryParseLsn(slotName, pluginName, database, rs, "restart_lsn"); } catch (SQLException e2) { - throw new ConnectException("Neither confirmed_flush_lsn or restart_lsn could be found"); + throw new ConnectException("Neither confirmed_flush_lsn nor restart_lsn could be found"); } }