forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfad153e
committed
Rewrite the sinval messaging mechanism to reduce contention and avoid
unnecessary cache resets. The major changes are:* When the queue overflows, we only issue a cache reset to the specificbackend or backends that still haven't read the oldest message, ratherthan resetting everyone as in the original coding.* When we observe backend(s) falling well behind, we signal SIGUSR1to only one backend, the one that is furthest behind and doesn't alreadyhave a signal outstanding for it. When it finishes catching up, it willin turn signal SIGUSR1 to the next-furthest-back guy, if there is one thatis far enough behind to justify a signal. The PMSIGNAL_WAKEN_CHILDRENmechanism is removed.* We don't attempt to clean out dead messages after every message-receiptoperation; rather, we do it on the insertion side, and only when the queuefullness passes certain thresholds.* Split SInvalLock into SInvalReadLock and SInvalWriteLock so that readersdon't block writers nor vice versa (except during the infrequent queuecleanout operations).* Transfer multiple sinval messages for each acquisition of a read orwrite lock.1 parent30dc388 commitfad153e
File tree
8 files changed
+413
-244
lines changed- src
- backend
- postmaster
- storage/ipc
- utils/cache
- include/storage
8 files changed
+413
-244
lines changedLines changed: 1 addition & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
3829 | 3829 |
| |
3830 | 3830 |
| |
3831 | 3831 |
| |
3832 |
| - | |
3833 |
| - | |
3834 |
| - | |
3835 |
| - | |
3836 |
| - | |
3837 |
| - | |
3838 |
| - | |
3839 |
| - | |
3840 |
| - | |
3841 |
| - | |
3842 | 3832 |
| |
3843 | 3833 |
| |
3844 | 3834 |
| |
|
Lines changed: 69 additions & 37 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 | 20 |
| |
22 |
| - | |
23 | 21 |
| |
24 | 22 |
| |
25 | 23 |
| |
26 | 24 |
| |
27 | 25 |
| |
28 | 26 |
| |
29 | 27 |
| |
30 |
| - | |
31 |
| - | |
32 |
| - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
33 | 31 |
| |
34 | 32 |
| |
35 | 33 |
| |
| |||
47 | 45 |
| |
48 | 46 |
| |
49 | 47 |
| |
50 |
| - | |
51 |
| - | |
| 48 | + | |
| 49 | + | |
52 | 50 |
| |
53 | 51 |
| |
54 |
| - | |
| 52 | + | |
55 | 53 |
| |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
| 54 | + | |
61 | 55 |
| |
62 | 56 |
| |
63 | 57 |
| |
64 | 58 |
| |
65 | 59 |
| |
66 | 60 |
| |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
67 | 65 |
| |
68 | 66 |
| |
69 |
| - | |
70 |
| - | |
71 |
| - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 |
| |
82 |
| - | |
| 87 | + | |
| 88 | + | |
83 | 89 |
| |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
| 90 | + | |
89 | 91 |
| |
90 |
| - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
91 | 103 |
| |
92 |
| - | |
93 |
| - | |
94 | 104 |
| |
95 | 105 |
| |
96 | 106 |
| |
97 | 107 |
| |
98 | 108 |
| |
| 109 | + | |
99 | 110 |
| |
100 |
| - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
101 | 117 |
| |
102 |
| - | |
103 |
| - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
104 | 121 |
| |
105 |
| - | |
106 |
| - | |
107 | 122 |
| |
108 |
| - | |
109 |
| - | |
110 |
| - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
111 | 143 |
| |
112 | 144 |
| |
113 | 145 |
| |
|
0 commit comments
Comments
(0)