Re: Simple postgresql.conf wizard - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Simple postgresql.conf wizard
Date
Msg-id 490ED5EB.1010207@hagander.net
Whole thread Raw
In response to Re: Simple postgresql.conf wizard  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-hackers
Greg Smith wrote:
> On Sun, 2 Nov 2008, Josh Berkus wrote:
> 
>> I'd start with command-line switches, e.g.
>> config --memory=32GB --type=DW --size=500GB --connections=20
> 
> That seems reasonable, I think I'll push a fancier UI on the backburner
> then and just spec out an options interface like this one.
> 
>> I think in initial versions we should just get the info from the
>> admin.  I've explored the issues around getting OS-independant
>> accurate system stats, and they are many.
> 
> I'm aware how thorny a perfect solution is here.  One thing that's nice
> about Python is that there are two interfaces for getting system
> information built-in, the os.sysconf I used already and the the
> distutils.sysconfig one, aimed more at C-level module writers.  Far as
> I've been able to tell it's not that hard to get something that works on
> most platforms to auto-detect memory and architecture, and I've realized
> the latter is kind of important because it determines how big you can
> make some things on 32-bit platforms.
> 
> After some digging I see there isn't any good interface built-in for
> Windows, but it's not hard to ask a DDL for the information.  I think
> it's reasonable to try and detect total memory+bit width, allow
> overriding that, and if detection fails and nothing was specified to
> error out. Should make a good balance of reasonable automatic behavior
> in a lot of cases, while still allowing the admin to adjust.  There's a
> completely valid use-case for that even not considering detection
> failures, where you're building a config file on a system other than the
> one it's being deployed onto.

Let me know if you need help to write whatever's needed to detect that
stuff on Windows. It shouldn't be too hard, as long as you can live with
a couple of lines of win32-specific code.. :-)

//Magnus



pgsql-hackers by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: Simple postgresql.conf wizard
Next
From: Magnus Hagander
Date:
Subject: Re: Simple postgresql.conf wizard