• Tom Lane's avatar
    Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables. · 6bc811c9
    Tom Lane authored
    Commit 88e98230 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>
    6bc811c9
guc.c 263 KB