Re: Refactoring GUC unit conversions - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Refactoring GUC unit conversions
Date
Msg-id 54DE35AC.3080600@BlueTreble.com
Whole thread Raw
In response to Refactoring GUC unit conversions  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Refactoring GUC unit conversions  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 2/13/15 7:26 AM, Heikki Linnakangas wrote:
> 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.

Looks good, but shouldn't there be a check for a unit that's neither 
memory or time?
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: compress method for spgist - 2
Next
From: Heikki Linnakangas
Date:
Subject: Re: Redesigning checkpoint_segments