- Notifications
You must be signed in to change notification settings - Fork5
Commit6d6d14b
committed
Redefine IsTransactionState() to only return true for TRANS_INPROGRESS state,
which is the only state in which it's safe to initiate database queries.It turns out that all but two of the callers thought that's what it meant;and the other two were using it as a proxy for "will GetTopTransactionId()return a nonzero XID"? Since it was in fact an unreliable guide to that,make those two just invoke GetTopTransactionId() always, then deal with azero result if they get one.1 parent24ee8af commit6d6d14b
File tree
3 files changed
+23
-39
lines changed- src/backend
- access/transam
- storage/ipc
- utils/error
3 files changed
+23
-39
lines changedLines changed: 18 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
259 |
| - | |
| 258 | + | |
| 259 | + | |
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 | 264 |
| |
265 | 265 |
| |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
271 |
| - | |
272 |
| - | |
273 |
| - | |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 | 266 |
| |
283 |
| - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
284 | 272 |
| |
285 |
| - | |
| 273 | + | |
286 | 274 |
| |
287 | 275 |
| |
288 | 276 |
| |
| |||
308 | 296 |
| |
309 | 297 |
| |
310 | 298 |
| |
311 |
| - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
312 | 302 |
| |
313 | 303 |
| |
314 | 304 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
| 26 | + | |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| |||
422 | 422 |
| |
423 | 423 |
| |
424 | 424 |
| |
425 |
| - | |
426 |
| - | |
427 |
| - | |
| 425 | + | |
| 426 | + | |
428 | 427 |
| |
429 | 428 |
| |
430 | 429 |
| |
|
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| |||
1593 | 1593 |
| |
1594 | 1594 |
| |
1595 | 1595 |
| |
1596 |
| - | |
1597 |
| - | |
1598 |
| - | |
1599 |
| - | |
1600 |
| - | |
1601 |
| - | |
| 1596 | + | |
1602 | 1597 |
| |
1603 | 1598 |
| |
1604 | 1599 |
| |
|
0 commit comments
Comments
(0)