Fix bug where walsender goes into a busy loop if connection is terminated.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Fix bug where walsender goes into a busy loop if connection is terminated. The problem was that ResetLatch was not being called in the walsender loop if the connection was terminated, so WaitLatch never sleeps until the terminated connection is detected. In the master-branch, this was already fixed as a side-effect of some refactoring of the loop. This commit backports that refactoring to 9.1. 9.0 does not have this bug, because we didn't use latches back then. Fujii Masao
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/walsender.c | modified | +60 −50 |