- Notifications
You must be signed in to change notification settings - Fork28
Commitd3f48df
committed
Further reduce memory footprint of CLOBBER_CACHE_ALWAYS testing.
Some buildfarm members using CLOBBER_CACHE_ALWAYS have been having OOMproblems of late. Commit2455ab4 addressed this problem by recoveringspace transiently used within RelationBuildPartitionDesc, but it turnsout that leaves quite a lot on the table, because other subroutines ofRelationBuildDesc also leak memory like mad. Let's move the temp-contextmanagement into RelationBuildDesc so that leakage from the othersubroutines is also recovered.I examined this issue by arranging for postgres.c to dump the size ofMessageContext just before resetting it in each command cycle, andthen running the update.sql regression test (which is one of the twothat are seeing buildfarm OOMs) with and without CLOBBER_CACHE_ALWAYS.Before2455ab4, the peak space usage with CCA was as much as 250MB.That patch got it down to ~80MB, but with this patch it's about 0.5MB,and indeed the space usage now seems nearly indistinguishable from anon-CCA build.RelationBuildDesc's traditional behavior of not worrying about leakingtransient data is of many years' standing, so I'm pretty hesitant tochange that without more evidence that it'd be useful in a normal build.(So far as I can see, non-CCA memory consumption is about the same withor without this change, whuch if anything suggests that it isn't useful.)Hence, configure the patch so that we recover space only whenCLOBBER_CACHE_ALWAYS or CLOBBER_CACHE_RECURSIVELY is defined. However,that choice can be overridden at compile time, in case somebody wouldlike to do some performance testing and try to develop evidence forchanging that decision.It's possible that we ought to back-patch this change, but in theabsence of back-branch OOM problems in the buildfarm, I'm not ina hurry to do that.Discussion:https://postgr.es/m/CA+TgmoY3bRmGB6-DUnoVy5fJoreiBJ43rwMrQRCdPXuKt4Ykaw@mail.gmail.com1 parentaefcc2b commitd3f48df
2 files changed
+52
-19
lines changedLines changed: 4 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
71 | 70 |
| |
72 | 71 |
| |
73 |
| - | |
74 |
| - | |
75 |
| - | |
76 |
| - | |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 | 72 |
| |
84 | 73 |
| |
85 | 74 |
| |
| |||
197 | 186 |
| |
198 | 187 |
| |
199 | 188 |
| |
200 |
| - | |
| 189 | + | |
201 | 190 |
| |
202 | 191 |
| |
203 | 192 |
| |
204 |
| - | |
| 193 | + | |
205 | 194 |
| |
206 | 195 |
| |
207 | 196 |
| |
| 197 | + | |
208 | 198 |
| |
209 | 199 |
| |
210 | 200 |
| |
| |||
214 | 204 |
| |
215 | 205 |
| |
216 | 206 |
| |
217 |
| - | |
| 207 | + | |
218 | 208 |
| |
219 |
| - | |
220 | 209 |
| |
221 | 210 |
| |
222 | 211 |
| |
| |||
228 | 217 |
| |
229 | 218 |
| |
230 | 219 |
| |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 | 220 |
| |
236 | 221 |
| |
237 | 222 |
| |
|
Lines changed: 48 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
96 | 109 |
| |
97 | 110 |
| |
98 | 111 |
| |
| |||
1014 | 1027 |
| |
1015 | 1028 |
| |
1016 | 1029 |
| |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1017 | 1052 |
| |
1018 | 1053 |
| |
1019 | 1054 |
| |
| |||
1023 | 1058 |
| |
1024 | 1059 |
| |
1025 | 1060 |
| |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1026 | 1067 |
| |
| 1068 | + | |
1027 | 1069 |
| |
1028 | 1070 |
| |
1029 | 1071 |
| |
| |||
1203 | 1245 |
| |
1204 | 1246 |
| |
1205 | 1247 |
| |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1206 | 1254 |
| |
1207 | 1255 |
| |
1208 | 1256 |
| |
|
0 commit comments
Comments
(0)