postgresql

Tomasz Kłoczko kloczek at rudy.mif.pg.gda.pl
Wed Jul 17 21:53:45 CEST 2002


On Wed, 17 Jul 2002, wrobell wrote:

> I have some ideas, which should be discussed.
> 
> 1. Multi database cluster solution.
> 
> -------- Postgresql docs -----------
> Before  you  can  do  anything, you  must  initialize  a
> database  storage area  on  disk. We  call  this a  database
> cluster.
> ------------------------------------
> In other words, database cluster is usually dir/file structure
> under /var/lib/pgsql. Let's continue. :-]
> 
> It is impossible to create Postgresql *clean* multi database cluster
> solution with PLD, currently. However, as many of us know, it is not
> the fault of this RDBMS:
> - every db cluster exists in separate directory
> - every db cluster is configured with files in db cluster directory
>   (pg_hba.conf, pg_ident.conf, postgresql.conf)
> - every postgresql instance has its own pid file
>   (postmaster.pid)
> - every postgresql instance has its own postmaster options file
>   (postmaster.opts)
> 
> So, let's simplify /etc/sysconfig/postgresql and /etc/rc.d/init.d/postgresql.
> 
> File /etc/sysconfig/postgresql should contain only one variable DATA_DIRS.
> The variable should contain all db cluster dirs, i.e.
> 
>     DATA_DIRS="/var/lib/pgsql1 /var/lib/pgsql2"
> 
> All other setting can be set in postgresql.conf and postmaster.opts files
> in given db cluster directory.
> 
> Above gives us init.d file simplification. We can remove all
> POSTMASTER_OPTIONS stuff and even more.
> 
> 2. Default behaviour, when there is no database cluster defined.
> 
> Currently, when db cluster is not defined, there is created a default one.
> 
> I think it should be changed, so there will be an error message that
> given db cluster does not exist and exit without any further action.
> 
> Comments?

OK but init scripts must allow work/initialize all in two modes: multi
cluster and single cluster. It will be good add variable for this in
/etc/sysconfig/postgresql.

Some usefull (probably) proposition on implementation level: IMHO instead
list in /etc/sysconfig/postgresql::DATA_DIRS directories/cluster names
better will be use subdirctories names in /var/lib/pgsql use as
cluster names if /etc/sysconfig/postgresql::MULTI_CLUSTER=yes

Where do you want put per cluste confifuration files ?

kloczek
-- 
-----------------------------------------------------------
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
-----------------------------------------------------------
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: kloczek at rudy.mif.pg.gda.pl*



More information about the pld-devel-en mailing list