postgresql/src/backend
Tom Lane fca85f8ef1 Fix walsender to exit promptly if client requests shutdown.
It's possible for WalSndWaitForWal to be asked to wait for WAL that doesn't
exist yet.  That's fine, in fact it's the normal situation if we're caught
up; but when the client requests shutdown we should not keep waiting.
The previous coding could wait indefinitely if the source server was idle.

In passing, improve the rather weak comments in this area, and slightly
rearrange some related code for better readability.

Back-patch to 9.4 where this code was introduced.

Discussion: https://postgr.es/m/14154.1498781234@sss.pgh.pa.us
2017-06-30 12:00:15 -04:00
..
access Fix typo in comment 2017-06-22 16:42:38 -04:00
bootstrap Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
catalog Add missing period to comment. 2017-06-30 10:01:45 -04:00
commands Copy collencoding in CREATE COLLATION / FROM 2017-06-30 08:50:39 -04:00
executor Fix transition tables for wCTEs. 2017-06-28 18:59:01 +01:00
foreign
lib Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
libpq Second try at fixing tcp_keepalives_idle option on Solaris. 2017-06-28 12:30:16 -04:00
main Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
nodes Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
optimizer Document partitioned_rels in create_modifytable_path header comment. 2017-06-22 13:52:50 -04:00
parser Re-allow SRFs and window functions within sub-selects within aggregates. 2017-06-27 17:51:11 -04:00
po
port Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
postmaster Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
regex
replication Fix walsender to exit promptly if client requests shutdown. 2017-06-30 12:00:15 -04:00
rewrite Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
snowball
statistics Fix typos in README.dependencies 2017-06-22 17:12:27 -04:00
storage Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
tcop Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
tsearch Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
utils Prohibit creating ICU collation with different ctype 2017-06-30 11:24:00 -04:00
.gitignore
common.mk
Makefile
nls.mk