- Notifications
You must be signed in to change notification settings - Fork28
Commitaf930e6
committed
Again fix initialization of auto-tuned effective_cache_size.
The previous method was overly complex and underly correct; in particular,by assigning the default value with PGC_S_OVERRIDE, it prevented laterattempts to change the setting in postgresql.conf, as noted by Jeff Janes.We should just assign the default value with source PGC_S_DYNAMIC_DEFAULT,which will have the desired priority relative to the boot_val as well asuser-set values.There is still a gap in this method: if there's an explicit assignment ofeffective_cache_size = -1 in the postgresql.conf file, and that assignmentappears before shared_buffers is assigned, the code will substitute 4 timesthe bootstrap default for shared_buffers, and that value will then persist(since it will have source PGC_S_FILE). I don't see any very nice wayto avoid that though, and it's not a case to be expected in practice.The existing comments in guc-file.l look forward to a redesign of theDYNAMIC_DEFAULT mechanism; if that ever happens, we should consider thiscase as one of the things we'd like to improve.1 parenta4c8f14 commitaf930e6
2 files changed
+13
-21
lines changedLines changed: 12 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4107 | 4107 |
| |
4108 | 4108 |
| |
4109 | 4109 |
| |
4110 |
| - | |
4111 |
| - | |
4112 |
| - | |
4113 |
| - | |
4114 |
| - | |
4115 |
| - | |
4116 |
| - | |
4117 |
| - | |
4118 |
| - | |
4119 |
| - | |
| 4110 | + | |
4120 | 4111 |
| |
4121 | 4112 |
| |
4122 | 4113 |
| |
| |||
4130 | 4121 |
| |
4131 | 4122 |
| |
4132 | 4123 |
| |
4133 |
| - | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
4134 | 4130 |
| |
4135 | 4131 |
| |
4136 | 4132 |
| |
4137 | 4133 |
| |
4138 | 4134 |
| |
4139 |
| - | |
4140 |
| - | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
4141 | 4138 |
| |
4142 |
| - | |
4143 |
| - | |
4144 |
| - | |
4145 |
| - | |
4146 |
| - | |
4147 |
| - | |
4148 |
| - | |
4149 |
| - | |
| 4139 | + | |
| 4140 | + | |
4150 | 4141 |
| |
4151 | 4142 |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
| 301 | + | |
301 | 302 |
| |
302 | 303 |
| |
303 | 304 |
| |
|
0 commit comments
Comments
(0)