Re: PostgreSQL configuration

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: PostgreSQL configuration
Дата
Msg-id 20040411151521.GA9391@gp.word-to-the-wise.com
обсуждение исходный текст
Ответ на Re: PostgreSQL configuration  (pgsql@mohawksoft.com)
Ответы Re: PostgreSQL configuration  (pgsql@mohawksoft.com)
Список pgsql-hackers
On Sat, Apr 10, 2004 at 03:53:49PM -0400, pgsql@mohawksoft.com wrote:
> > The whole idea of having multiple command-line switches to pick config
> > and data separately bothers me.  ISTM this would mostly create great new
> > opportunities to shoot yourself in the foot (by accidentally picking the
> > wrong combination), without nearly enough benefit to outweigh the risk.
> 
> This is where I think we disagree. Very much so, in fact. I think having
> something like:
> 
> /etc/postgres/webdb.conf
> In which there is a line:
> datadir=/RAID0/postgres
> 
> and
> 
> /etc/postgres/testdb.conf
> In which there is this line
> datadir=/RAID1/postgres
> 
> Allows for a very standardized, and IMHO, very self documenting installation.

But not as flexible as the existing alternative.

For instance, what if webdb is PostgreSQL 7.3 and testdb is PostgreSQL
7.4?  There is no way you can put that difference in a configuration
file, so the user will still need to know which binary of postgresql
to fire up.

So, yes, let's have a standard directory for storing the configuration
for all the PostgreSQL installations on the machine.

/etc/postgres sounds fine.

In /etc/postgres/webdb:

#!/bin/sh
datadir=/RAID0/postgres
/usr/local/pgsql73/bin/postmaster -D $datadir

and in /etc/postgres/testdb

#!/bin/sh
datadir=/RAID1/postgres
/usr/local/pgsql742/bin/postmaster -D $datadir

Much more flexible and explicitly self-documenting.

For more flexibility still, do what I do and make the scripts standard
rc.d style startup scripts.

To walk a user through listing the supported installations is easy -
'ls /etc/postgres'. Starting and stopping one - '/etc/postgres/webdb start'
or '/etc/postgres/webdb stop'. Checking system status and displaying the
data directory '/etc/postgres/webdb status'.

It seems to me to be far more intuitive to the end user, and to the
typical admin than your -C suggestion, it's certainly safer, and it
works fine now.

Cheers, Steve


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: 7.5 beta version
Следующее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: PostgreSQL configuration