forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita684581
committed
Cache by-reference missing values in a long lived context
Attribute missing values might be needed past the lifetime of the tupledescriptors from which they are extracted. To avoid possibly usingpointers for by-reference values which might thus be left dangling, wecache a datumCopy'd version of the datum in the TopMemoryContext. Sincewe first search for the value this only needs to be done once persession for any such value.Original complaint from Tom Lane, idea for mitigation by Andrew Dunstan,tweaked by Tom Lane.Backpatch to version 11 where missing values were introduced.Discussion:https://postgr.es/m/1306569.1687978174@sss.pgh.pa.us1 parent757fa45 commita684581
File tree
2 files changed
+90
-1
lines changed- src
- backend/access/common
- tools/pgindent
2 files changed
+90
-1
lines changedLines changed: 89 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
63 | 64 |
| |
| 65 | + | |
64 | 66 |
| |
| 67 | + | |
| 68 | + | |
65 | 69 |
| |
66 | 70 |
| |
67 | 71 |
| |
| |||
71 | 75 |
| |
72 | 76 |
| |
73 | 77 |
| |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
74 | 129 |
| |
75 | 130 |
| |
76 | 131 |
| |
| |||
102 | 157 |
| |
103 | 158 |
| |
104 | 159 |
| |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
105 | 165 |
| |
106 |
| - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
107 | 195 |
| |
108 | 196 |
| |
109 | 197 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3479 | 3479 |
| |
3480 | 3480 |
| |
3481 | 3481 |
| |
| 3482 | + | |
3482 | 3483 |
| |
3483 | 3484 |
| |
3484 | 3485 |
| |
|
0 commit comments
Comments
(0)