Refactoring GUC unit conversions - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Refactoring GUC unit conversions
Date
Msg-id 54DDFB76.9080303@vmware.com
Whole thread Raw
Responses Re: Refactoring GUC unit conversions  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: Refactoring GUC unit conversions  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
In the "redesign checkpoint_segments" patch, Robert suggested keeping
the settings' base unit as "number of segments", but allow conversions
from MB, GB etc. I started looking into that and found that adding a new
unit to guc.c is quite messy. The conversions are done with complicated
if-switch-case constructs.

Attached is a patch to refactor that, making the conversions
table-driven. This doesn't change functionality, it just makes the code
nicer.

Any objections?

- Heikki

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Using 128-bit integers for sum, avg and statistics aggregates
Next
From: Teodor Sigaev
Date:
Subject: anyarray