forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0fedb4e
committed
Fix walsender timeouts when decoding a large transaction
The logical slots have a fast code path for sending data so as not toimpose too high a per message overhead. The fast path skips checks forinterrupts and timeouts. However, the existing coding failed to considerthe fact that a transaction with a large number of changes may take avery long time to be processed and sent to the client. This causes thewalsender to ignore interrupts for potentially a long time and moreimportantly it will result in the walsender being killed due totimeout at the end of such a transaction.This commit changes the fast path to also check for interrupts and onlyallows calling the fast path when the last keepalive check happened lessthan half the walsender timeout ago. Otherwise the slower code path willbe taken.Backpatched to 9.4Petr Jelinek, reviewed by Kyotaro HORIGUCHI, Yura Sokolov, CraigRinger and Robert Haas.Discussion:https://postgr.es/m/e082a56a-fd95-a250-3bae-0fff93832510@2ndquadrant.com1 parent1fcd0ad commit0fedb4e
1 file changed
+37
-29
lines changedLines changed: 37 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1151 | 1151 |
| |
1152 | 1152 |
| |
1153 | 1153 |
| |
| 1154 | + | |
| 1155 | + | |
1154 | 1156 |
| |
1155 | 1157 |
| |
1156 | 1158 |
| |
| |||
1160 | 1162 |
| |
1161 | 1163 |
| |
1162 | 1164 |
| |
1163 |
| - | |
| 1165 | + | |
| 1166 | + | |
1164 | 1167 |
| |
1165 | 1168 |
| |
1166 | 1169 |
| |
1167 |
| - | |
| 1170 | + | |
| 1171 | + | |
1168 | 1172 |
| |
1169 | 1173 |
| |
1170 | 1174 |
| |
1171 | 1175 |
| |
1172 |
| - | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
1173 | 1181 |
| |
| 1182 | + | |
1174 | 1183 |
| |
| 1184 | + | |
1175 | 1185 |
| |
1176 | 1186 |
| |
1177 | 1187 |
| |
1178 | 1188 |
| |
1179 |
| - | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1180 | 1213 |
| |
1181 | 1214 |
| |
1182 | 1215 |
| |
| |||
1198 | 1231 |
| |
1199 | 1232 |
| |
1200 | 1233 |
| |
1201 |
| - | |
1202 |
| - | |
1203 |
| - | |
1204 | 1234 |
| |
1205 | 1235 |
| |
1206 | 1236 |
| |
1207 |
| - | |
1208 |
| - | |
1209 |
| - | |
1210 |
| - | |
1211 |
| - | |
1212 |
| - | |
1213 |
| - | |
1214 |
| - | |
1215 |
| - | |
1216 |
| - | |
1217 |
| - | |
1218 |
| - | |
1219 |
| - | |
1220 |
| - | |
1221 |
| - | |
1222 |
| - | |
1223 |
| - | |
1224 |
| - | |
1225 |
| - | |
1226 |
| - | |
1227 |
| - | |
1228 |
| - | |
1229 | 1237 |
| |
1230 | 1238 |
| |
1231 | 1239 |
| |
|
0 commit comments
Comments
(0)