Commit 993d94c
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 190765a commit 993d94c
2 files changed
+16
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7998 | 7998 | | |
7999 | 7999 | | |
8000 | 8000 | | |
8001 | | - | |
8002 | | - | |
8003 | 8001 | | |
8004 | 8002 | | |
8005 | 8003 | | |
8006 | 8004 | | |
8007 | 8005 | | |
8008 | 8006 | | |
8009 | | - | |
8010 | | - | |
| 8007 | + | |
| 8008 | + | |
8011 | 8009 | | |
8012 | 8010 | | |
8013 | | - | |
8014 | | - | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
| 8014 | + | |
| 8015 | + | |
| 8016 | + | |
| 8017 | + | |
8015 | 8018 | | |
8016 | 8019 | | |
8017 | 8020 | | |
| |||
8022 | 8025 | | |
8023 | 8026 | | |
8024 | 8027 | | |
| 8028 | + | |
| 8029 | + | |
| 8030 | + | |
8025 | 8031 | | |
| 8032 | + | |
| 8033 | + | |
8026 | 8034 | | |
8027 | 8035 | | |
8028 | 8036 | | |
| |||
| 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