Re: Simple postgresql.conf wizard

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simple postgresql.conf wizard
Date: 2008-11-03 05:44:22
Message-ID: Pine.GSO.4.64.0811030025530.442@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-11-03 06:41:25 Re: Hot standby v5 patch assertion failure
Previous Message Zhe He 2008-11-03 05:28:07 How to parse Datum