Re: Simple postgresql.conf wizard

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Simple postgresql.conf wizard
Дата
Msg-id 490ED5EB.1010207@hagander.net
обсуждение исходный текст
Ответ на Re: Simple postgresql.conf wizard  (Greg Smith <gsmith@gregsmith.com>)
Список 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 по дате отправления:

Предыдущее
От: Tino Wildenhain
Дата:
Сообщение: Re: Simple postgresql.conf wizard
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Simple postgresql.conf wizard