On Thu, 2003-01-30 at 00:18, Buchan Milne wrote:
> James Gregory wrote:
> > 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
>
> [...]
>
> > 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.
> >
>
> Haven't tried this, and am not sure how the args should be passed (ie
> should -o be passed if PGOPTS isn't set but PGPORT it?) but it would be
> something like this:
[snip]
yes, that was in fact what I had in mind. However it occurs to me that
it's unnecessary; the -o will be there anyway to set the port. if PGOPTS
isn't set then it will just append the empty string => no harm done.
ie, PGPORT seems to be set regardless. I haven't looked into where it is
set, but the existing script works on the assumption that it is, so we
should too.
I was going to suggest that PGOPTS be removed entirely, since it's now
in the GUC. However, it may remain convenient for users to pass misc
options to the postmaster for some time yet...
That said It should probably be phased out eventually -- should we just
remove the PGOPTS line and ignore the whole debacle? (and put the
comment pointing users to the config file in its place)
James.