- Notifications
You must be signed in to change notification settings - Fork5
Commit94ae6ba
committed
Send keepalives from walsender even when busy sending WAL.
If walsender doesn't hear from the client for the time specified bywal_sender_timeout, it will conclude the connection or client is dead, anddisconnect. When half of wal_sender_timeout has elapsed, it sends a pingto the client, leaving it the remainig half of wal_sender_timeout torespond. However, it only checked if half of wal_sender_timeout had elapsedwhen it was about to sleep, so if it was busy sending WAL to the client forlong enough, it would not send the ping request in time. Then the clientwould not know it needs to send a reply, and the walsender will disconnecteven though the client is still alive. Fix that.Andres Freund, reviewed by Robert Haas, and some further changes by me.Backpatch to 9.3. Earlier versions relied on the client to send thekeepalives on its own, and hence didn't have this problem.1 parentbf4052f commit94ae6ba
1 file changed
+29
-24
lines changedLines changed: 29 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1258 | 1258 |
| |
1259 | 1259 |
| |
1260 | 1260 |
| |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1261 | 1282 |
| |
1262 | 1283 |
| |
1263 | 1284 |
| |
| |||
1267 | 1288 |
| |
1268 | 1289 |
| |
1269 | 1290 |
| |
1270 |
| - | |
| 1291 | + | |
1271 | 1292 |
| |
1272 | 1293 |
| |
1273 | 1294 |
| |
| |||
1276 | 1297 |
| |
1277 | 1298 |
| |
1278 | 1299 |
| |
1279 |
| - | |
1280 |
| - | |
1281 |
| - | |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
1286 |
| - | |
1287 |
| - | |
1288 |
| - | |
1289 |
| - | |
1290 |
| - | |
1291 |
| - | |
1292 |
| - | |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
1297 | 1300 |
| |
1298 |
| - | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
1299 | 1306 |
| |
1300 |
| - | |
1301 |
| - | |
1302 |
| - | |
1303 | 1307 |
| |
1304 |
| - | |
1305 | 1308 |
| |
1306 | 1309 |
| |
1307 | 1310 |
| |
| |||
1315 | 1318 |
| |
1316 | 1319 |
| |
1317 | 1320 |
| |
| 1321 | + | |
| 1322 | + | |
1318 | 1323 |
| |
1319 | 1324 |
| |
1320 | 1325 |
| |
|
0 commit comments
Comments
(0)