Re: PostgreSQL configuration

Поиск
Список
Период
Сортировка
От pgsql@mohawksoft.com
Тема Re: PostgreSQL configuration
Дата
Msg-id 17817.24.91.171.78.1081698992.squirrel@mail.mohawksoft.com
обсуждение исходный текст
Ответ на Re: PostgreSQL configuration  (Steve Atkins <steve@blighty.com>)
Ответы Re: PostgreSQL configuration  (Robert Treat <xzilla@users.sourceforge.net>)
Список 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.

But your existing alternative is *NOT* going away.

>
> 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.

But also has multiple shell scripts and you can't share or have standard
configuration files like  pg_hba or pg_ident.

>
> 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.

I don't see the "safer" argument. If we wanted "safer" we would code
PostgreSQL in Java or BASIC. What we want is efficiency.

Admittedly, my patch is not intended to make the users of multiple
installations/versions of PostgreSQL any easier or, for that matter, any
different. No one is suggesting changing the default behavior of
PostgreSQL. All the people arguing against this patch will never even
notice that it is there.

For all the people who would like PostgreSQL to fit in a FHS system,
easily, they will probably use it. In fact, I would bet real money, that
if this functionality is incorporated into PostgreSQL, it will become the
defacto methodology for the various distributions.




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

Предыдущее
От: Steve Atkins
Дата:
Сообщение: Re: PostgreSQL configuration
Следующее
От: Sean Chittenden
Дата:
Сообщение: Information/schema hiding...