pgsql: Restore replication protocol's duplicate command tags
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Date: 2020-10-14T23:16:27Z
Lists: pgsql-hackers
Restore replication protocol's duplicate command tags I removed the duplicate command tags for START_REPLICATION inadvertently in commit 07082b08cc5d, but the replication protocol requires them. The fact that the replication protocol was broken was not noticed because all our test cases use an optimized code path that exits early, failing to verify that the behavior is correct for non-optimized cases. Put them back. Also document this protocol quirk. Add a test case that shows the failure. It might still succeed even without the patch when run on a fast enough server, but it suffices to show the bug in enough cases that it would be noticed in buildfarm. Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Reported-by: Henry Hinze <henry.hinze@gmail.com> Reviewed-by: Petr Jelínek <petr.jelinek@2ndquadrant.com> Discussion: https://postgr.es/m/16643-eaadeb2a1a58d28c@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/72e43fc313e93c95704c574bcf98805805668063 Modified Files -------------- doc/src/sgml/protocol.sgml | 8 +++-- src/backend/replication/logical/worker.c | 1 - src/backend/replication/walsender.c | 3 +- src/test/subscription/t/100_bugs.pl | 55 +++++++++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 6 deletions(-)
Commits
-
Fix query in new test to check tables are synced
- 9f783aea669f 13.1 landed
- 7f4708818317 14.0 landed
-
Restore replication protocol's duplicate command tags
- 72e43fc313e9 13.1 cited
-
Fix bogus completion tag usage in walsender
- 07082b08cc5d 14.0 cited