postgres.git / summary / log / commit / refs
commit a267894529b260002cdb85cde9680529ae4ceeb4
Author: Noah Misch <noah@leadboat.com>
Date: Thu May 14 03:42:09 2020 +0000
First released in: 13.0, 9.5.23, 9.6.19, 10.14, 11.9, 12.4
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
src/bin/pg_basebackup/pg_recvlogical.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index 857b61c8f72..f2fe4c55b2f 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -128,7 +128,7 @@ sendFeedback(PGconn *conn, TimestampTz 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)
[parent: 357012e17f3f]