Commit 6bc811c
committed
Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables.
Commit 88e9823 invented GUC_UNIT_XSEGS for min_wal_size and max_wal_size,
but neglected to make it display sensibly in pg_settings.unit (by adding a
case to the switch in GetConfigOptionByNum). Fix that, and adjust said
switch to throw a run-time error the next time somebody forgets.
In passing, avoid using a static buffer for the output string --- the rest
of this function pstrdup's from a local buffer, and I see no very good
reason why the units code should do it differently and less safely.
Per report from Otar Shavadze. Back-patch to 9.5 where the new unit type
was added.
Report: <CAG-jOyA=iNFhN+yB4vfvqh688B7Tr5SArbYcFUAjZi=0Exp-Lg@mail.gmail.com>1 parent 814b9e9 commit 6bc811c
2 files changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8016 | 8016 | | |
8017 | 8017 | | |
8018 | 8018 | | |
8019 | | - | |
8020 | | - | |
8021 | 8019 | | |
8022 | 8020 | | |
8023 | 8021 | | |
8024 | 8022 | | |
8025 | 8023 | | |
8026 | 8024 | | |
8027 | | - | |
8028 | | - | |
| 8025 | + | |
| 8026 | + | |
8029 | 8027 | | |
8030 | 8028 | | |
8031 | | - | |
8032 | | - | |
| 8029 | + | |
| 8030 | + | |
| 8031 | + | |
| 8032 | + | |
| 8033 | + | |
| 8034 | + | |
| 8035 | + | |
8033 | 8036 | | |
8034 | 8037 | | |
8035 | 8038 | | |
| |||
8040 | 8043 | | |
8041 | 8044 | | |
8042 | 8045 | | |
| 8046 | + | |
| 8047 | + | |
| 8048 | + | |
8043 | 8049 | | |
| 8050 | + | |
| 8051 | + | |
8044 | 8052 | | |
8045 | 8053 | | |
8046 | 8054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
0 commit comments