summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2020-05-13 20:42:09 -0700
committerNoah Misch <noah@leadboat.com>2020-05-13 20:42:46 -0700
commit1ab5b672e43ae89f1eb49107062125936d1e9794 (patch)
tree462f19a7aa0c0840225dda2a82fd21bb4294bf76 /src
parentb3960286a6fa1b195a06cfc38701866e21394861 (diff)
Fix pg_recvlogical avoidance of superfluous Standby Status Update.
The defect suppressed a Standby Status Update message when bytes flushed to disk had changed but bytes received had not changed. If pg_recvlogical then exited with no intervening Standby Status Update, the next pg_recvlogical repeated already-flushed records. The defect could also cause superfluous messages, which are functionally harmless. Back-patch to 9.5 (all supported versions). Discussion: https://postgr.es/m/20200502221647.GA3941274@rfd.leadboat.com
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_basebackup/pg_recvlogical.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index cb5f989a763..37b33449b91 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -121,7 +121,7 @@ sendFeedback(PGconn *conn, int64 now, bool force, bool replyRequested)
*/
if (!force &&
last_written_lsn == output_written_lsn &&
- last_fsync_lsn != output_fsync_lsn)
+ last_fsync_lsn == output_fsync_lsn)
return true;
if (verbose)