pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var
3+ messages / 1 participants
[nested] [flat]

* pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var
@ 2016-10-03 20:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2016-10-03 20:40 UTC (permalink / raw)
  To: pgsql-committers

Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables.

Commit 88e982302 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>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6bc811c992a804bdb8d228ce0be9f0a8e7198df6

Modified Files
--------------
src/backend/utils/misc/guc.c | 20 ++++++++++++++------
src/include/utils/guc.h      |  4 ++--
2 files changed, 16 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var
@ 2016-10-03 20:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2016-10-03 20:40 UTC (permalink / raw)
  To: pgsql-committers

Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables.

Commit 88e982302 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>

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/993d94c59038fb80068a2b7780a1062dcaa2bb4f

Modified Files
--------------
src/backend/utils/misc/guc.c | 20 ++++++++++++++------
src/include/utils/guc.h      |  4 ++--
2 files changed, 16 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var
@ 2016-10-03 20:40 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2016-10-03 20:40 UTC (permalink / raw)
  To: pgsql-committers

Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS variables.

Commit 88e982302 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>

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f50fa46cca9a1e5bfd517f7f1d979ef4db55ce03

Modified Files
--------------
src/backend/utils/misc/guc.c | 20 ++++++++++++++------
src/include/utils/guc.h      |  4 ++--
2 files changed, 16 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2016-10-03 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03 20:40 pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var Tom Lane <tgl@sss.pgh.pa.us>
2016-10-03 20:40 pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var Tom Lane <tgl@sss.pgh.pa.us>
2016-10-03 20:40 pgsql: Show a sensible value in pg_settings.unit for GUC_UNIT_XSEGS var Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox