On Wed, 2003-01-29 at 20:36, Guillaume Rousse wrote:
> Le Mercredi 29 Janvier 2003 08:12, James Gregory a �crit :
> > On Wed, 2003-01-29 at 18:04, James Gregory wrote:
> > > I suspect the culprit is this line:
> > >
> > > su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -p
> > > /usr/bin/postmaster -o '-p ${PGPORT}' start  > /dev/null 2>&1" <
> > > /dev/null
> >
> > ... indeed it was. I'm now using this:
> >
> > su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl  -D $PGDATA -p
> > /usr/bin/postmaster -o '-p ${PGPORT} ${PGOPTS}' start  > /dev/null 2>&1"
> > < /dev/null
> Don't change the initscript. Use /var/log/pgsql/data/postgres.conf instead.

I don't actually have a /var/log/pgsql, I went hunting for one when my
server didn't come up. If you're referring to
/var/lib/pgsql/data/postgres.conf, yes, you're quite right, that's where
the setting goes, as per
/usr/share/doc/postgresql-7.3.1/README.rpm-dist.

So, I want to know - what purpose does the line 

export PGOPTS

have in /etc/rc.d/init.d/postgresql have if not to specify such options?
If you search for that string, you'll notice it's only used once, on
that line. The variable is never referred to again.

My reading of the file is that it is intended to read the options in
from /etc/sysconfig/pgsql/postgresql and apply them if they are present.
This is all well and good, except that unlike PGDATA and PGPORT, PGOPTS
is never used.

I think that either my modification (well, a variation which tests
whether PGOPTS is set) should be applied or the section that exports
PGOPTS should be removed and a note placed there that all configuration
(including -i) should be done in the relevant configuration file (and
name said configuration file)

There should be *one* way to configure these things, and it should be
easy.

Thanks,

James.



Reply via email to