postgresql/src/backend
Michael Paquier 0414ac6a1e Make logical WAL sender report streaming state appropriately
WAL senders sending logically-decoded data fail to properly report in
"streaming" state when starting up, hence as long as one extra record is
not replayed, such WAL senders would remain in a "catchup" state, which
is inconsistent with the physical cousin.

This can be easily reproduced by for example using pg_recvlogical and
restarting the upstream server.  The TAP tests have been slightly
modified to detect the failure and strengthened so as future tests also
make sure that a node is in streaming state when waiting for its
catchup.

Backpatch down to 9.4 where this code has been introduced.

Reported-by: Sawada Masahiko
Author: Simon Riggs, Sawada Masahiko
Reviewed-by: Petr Jelinek, Michael Paquier, Vaishnavi Prabakaran
Discussion: https://postgr.es/m/CAD21AoB2ZbCCqOx=bgKMcLrAvs1V0ZMqzs7wBTuDySezTGtMZA@mail.gmail.com
2018-07-12 10:19:51 +09:00
..
access Avoid emitting a bogus WAL record when recycling an all-zero btree page. 2018-07-09 19:26:19 -04:00
bootstrap Message wording and pluralization improvements 2018-05-17 23:05:27 -04:00
catalog Enable failure to rename a partitioned index 2018-06-26 11:54:45 -04:00
commands Add UtilityReturnsTuples() support for CALL 2018-07-09 13:58:51 +02:00
executor Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode. 2018-07-11 12:07:21 -04:00
foreign Remove bogus "extern" annotations on function definitions. 2018-02-19 12:07:44 -05:00
jit Remove duplicated return statement from llvmjit code. 2018-06-26 23:16:50 -07:00
lib Add missing files to src/backend/lib/README. 2018-05-22 13:25:28 +03:00
libpq Make capitalization of term "OpenSSL" more consistent 2018-06-29 09:45:44 +09:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode. 2018-07-11 12:07:21 -04:00
optimizer Fix create_scan_plan's handling of sortgrouprefs for physical tlists. 2018-07-11 15:25:28 -04:00
parser Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode. 2018-07-11 12:07:21 -04:00
partitioning Better handle pseudotypes as partition keys 2018-07-10 15:16:27 -04:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Remove investigative code for can't-reattach-to-shared-memory errors. 2018-05-01 13:06:31 -04:00
postmaster Further improve code for probing the availability of ARM CRC instructions. 2018-05-03 11:32:57 -04:00
regex Clean up warnings from -Wimplicit-fallthrough. 2018-05-01 19:35:08 -04:00
replication Make logical WAL sender report streaming state appropriately 2018-07-12 10:19:51 +09:00
rewrite Simplify view-expansion code in rewriteHandler.c. 2018-04-14 21:01:03 -04:00
snowball Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
statistics Fix bogus code for extracting extended-statistics data from syscache. 2018-05-02 12:23:00 -04:00
storage Improve the performance of relation deletes during recovery. 2018-07-05 02:25:45 +09:00
tcop Add UtilityReturnsTuples() support for CALL 2018-07-09 13:58:51 +02:00
tsearch Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
utils Use context with correct lifetime in hypothetical_dense_rank_final. 2018-07-04 17:36:19 -07:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00