Re: pg_config, pg_service.conf, postgresql.conf ....

From: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
To: "Christopher Browne" <cbbrowne(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_config, pg_service.conf, postgresql.conf ....
Date: 2006-02-28 17:36:03
Message-ID: 16708.24.91.171.78.1141148163.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> After takin a swig o' Arrakan spice grog, pgsql(at)mohawksoft(dot)com ("Mark
> Woodward") belched out:
>>> Mark Woodward wrote:
>> Like I have repeated a number of times, sometimes, there is more than
>> one
>> database cluster on a machine. The proposed pg_clusters.conf, could look
>> like this:
>>
>> pg_clusters.conf>>>>
>> [GEO]
>> DATADIR=/vol01/pggeo
>> PORT=5435
>>
>> [ICDMDB]
>> DATADIR=/vol01/pgicdmdb
>> PORT=5434
>>
>> [TOMLANE]
>> DATADIR=/vol03/pg74
>> PORT=5433
>> POSTMASTER=/usr/local/pg7.4.1/bin/postmaster
>>
>> [POSTMASTER]
>> DATADIR=/vol02/pg90
>> PORT=5432
>>
>> # Virtual target starts all?
>> [ALL]
>> DB0=GEO
>> DB1=ICDMDB
>> DB2=TOMLANE
>>
>> <<<<<<<<<
>>
>> pg_ctl start
>> (Finds and starts the "POSTMASTER" entry)
>>
>> pg_ctl -S ICDMDB start
>> (Starts the ICDMDB cluster)
>>
>> pg_ctl startall
>> or
>> pg_ctl -S [*|all] start
>> or
>> pg_ctl startall
>>
>>
>> Or maybe even "start" will start a virtual target "ALL"
>
> I can point at three things there that are distinctly wrong.
>
> - PORT should *never* be specified in that file, because it is already
> specified in each respective postgresql.conf file.

If one can specify a different port than the default on the command line,
why wouldn't a file designed to describe the server process include it. My
intention is to include all the options available via environment or
command lon in the file.

>
> - POSTMASTER is the wrong thing to point to; you should be pointing to
> a path, instead, and it must ALWAYS be specified.

I'm not sure I agree. I have been intending to let the system to use the
defaults when alternatves are not specified. The POSTMASTER entry was for
Tom Lane's suggestion that alternate postgresql versions be used.

I am open to a better cleaner way to accomplish Tom's request.

>
> - You provide no indication of where log files are to be stowed.
> In version 8, there are options for that to be specified in the
> postgresql.conf file, but not so, for earlier versions...

OK, I guess that comes along with all the command line or environment
variables.

>
> I'm not keen on the Windows .ini file style sectioning; that makes it
> look like a mix between a shell script and something else. It should
> be one or the other. It probably should be directly executable by
> something...

Hmm, while I agree that "ini" file is kind of ugly, it is fairly common in
the industry, human readable, and does what it needed.

>
> But having some central "registry" that consists of data directories
> and binary directories (and possibly log directories) seems reasonably
> elegant.

Oh, man, don't even get me started about registries and bottomless
directories. Let's just say I respectfully disagree :-)

How's this:

[SERVERNAME]
DATADIR=path_to_data
LOGFILE=path_to_log
OPTIONS=....
PORT=nnn
MAX-CONNECT=nnn
DEBUG=nnn
FSYNC=[on|off]
NAME=VALUE
PGBIN=path_to_pg_installation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2006-02-28 17:36:28 Re: [PERFORM] temporary indexes
Previous Message Andrew Dunstan 2006-02-28 17:33:33 Re: new feature: LDAP database name resolution