forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita282697
committed
Remove code in charge of freeing regexps generation by Lab.c
bea3d7e has redesigned the regexp engine so as all the allocations gothrough palloc() with a dedicated memory context. hba.c had to copewith the past memory management logic by going through all the HBA andident lines generated, then directly free all the regexps found inAuthTokens to ensure that no leaks would happen. Such leaks couldhappen for example in the postmaster after a SIGHUP, in the event ofan HBA and/or ident reload failure where all the new content parsed mustbe discarded, including all the regexps that may have been compiled.Now that regexps are palloc()'d in their own memory context,MemoryContextDelete() is enough to ensure that all the compiled regexpsare properly gone. Simplifying this logic in hba.c has the effect toonly remove code. Most of it is new in v16, except the part for regexpscompiled in ident entries for the system username, so doing this cleanupnow rather than when v17 opens for business will reduce future diffswith the upcoming REL_16_STABLE.Some comments were incorrect sincebea3d7e, now fixed to reflect thereality.Reviewed-by: Bertrand Drouvot, Álvaro HerreraDiscussion:https://postgr.es/m/ZDdJ289Ky2qEj4h+@paquier.xyz1 parent0981846 commita282697
1 file changed
+5
-67
lines changedLines changed: 5 additions & 67 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 | 98 |
| |
104 | 99 |
| |
105 | 100 |
| |
| |||
316 | 311 |
| |
317 | 312 |
| |
318 | 313 |
| |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
324 |
| - | |
325 |
| - | |
326 |
| - | |
327 |
| - | |
328 |
| - | |
329 |
| - | |
330 |
| - | |
331 |
| - | |
332 |
| - | |
333 |
| - | |
334 |
| - | |
335 |
| - | |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
342 |
| - | |
343 | 314 |
| |
344 | 315 |
| |
345 | 316 |
| |
| |||
2722 | 2693 |
| |
2723 | 2694 |
| |
2724 | 2695 |
| |
2725 |
| - | |
2726 |
| - | |
2727 |
| - | |
| 2696 | + | |
| 2697 | + | |
2728 | 2698 |
| |
2729 |
| - | |
2730 |
| - | |
2731 |
| - | |
2732 |
| - | |
2733 |
| - | |
2734 |
| - | |
2735 | 2699 |
| |
2736 | 2700 |
| |
2737 | 2701 |
| |
2738 | 2702 |
| |
2739 | 2703 |
| |
2740 |
| - | |
2741 |
| - | |
2742 |
| - | |
2743 |
| - | |
2744 |
| - | |
2745 |
| - | |
2746 |
| - | |
2747 |
| - | |
2748 |
| - | |
2749 | 2704 |
| |
2750 | 2705 |
| |
2751 | 2706 |
| |
| |||
3044 | 2999 |
| |
3045 | 3000 |
| |
3046 | 3001 |
| |
3047 |
| - | |
3048 |
| - | |
| 3002 | + | |
3049 | 3003 |
| |
3050 | 3004 |
| |
3051 | 3005 |
| |
| |||
3102 | 3056 |
| |
3103 | 3057 |
| |
3104 | 3058 |
| |
3105 |
| - | |
3106 |
| - | |
3107 |
| - | |
| 3059 | + | |
| 3060 | + | |
3108 | 3061 |
| |
3109 |
| - | |
3110 |
| - | |
3111 |
| - | |
3112 |
| - | |
3113 |
| - | |
3114 |
| - | |
3115 | 3062 |
| |
3116 | 3063 |
| |
3117 | 3064 |
| |
3118 | 3065 |
| |
3119 | 3066 |
| |
3120 |
| - | |
3121 |
| - | |
3122 |
| - | |
3123 |
| - | |
3124 |
| - | |
3125 |
| - | |
3126 |
| - | |
3127 |
| - | |
3128 |
| - | |
3129 | 3067 |
| |
3130 | 3068 |
| |
3131 | 3069 |
| |
|
0 commit comments
Comments
(0)