forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5fde047
committed
Combine two flag tests in GetSnapshotData().
Previously the code checked PROC_IN_LOGICAL_DECODING andPROC_IN_VACUUM separately. As the relevant variable is marked asvolatile, the compiler cannot combine the two tests. AsGetSnapshotData() is pretty hot in a number of workloads, it'sworthwhile to fix that.It'd also be a good idea to get rid of the volatiles altogether. Butfor one that's a larger patch, and for another, the code after thischange still seems at least as easy to read as before.Author: Andres FreundDiscussion:https://postgr.es/m/20181005172955.wyjb4fzcdzqtaxjq@alap3.anarazel.de1 parent5fc1670 commit5fde047
1 file changed
+4
-7
lines changedLines changed: 4 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1589 | 1589 |
| |
1590 | 1590 |
| |
1591 | 1591 |
| |
1592 |
| - | |
1593 |
| - | |
| 1592 | + | |
| 1593 | + | |
1594 | 1594 |
| |
1595 |
| - | |
1596 |
| - | |
1597 |
| - | |
1598 |
| - | |
1599 |
| - | |
| 1595 | + | |
| 1596 | + | |
1600 | 1597 |
| |
1601 | 1598 |
| |
1602 | 1599 |
| |
|
0 commit comments
Comments
(0)