On Sun, 21 May 2000, Thomas Good wrote:
> On the GENERAL list the issue of firing up a server, and the silent flag
> used by the default redhatter 'postgresql' script in init.d came up.
Yes, I read the thread. I didn't write the original initscript -- but
hopefully have changed it to more your liking (see below).
> I redirect output to /var/lib/pgsql/postlog after I rm the -S from the
> call to the server...not having pg complain when I screw up my CGI
> scripts is no good to me.
> If I were to have a vote, I'd urge whomever to add a comment to 'postgresql
> the script' to offer logging in the manner described above.
The 7.0 RPM's /etc/rc.d/init.d/postgresql script uses pg_ctl, rather than
directly starting postmaster (and has since 7.0beta2, IIRC) -- and the
PGDATA/postmaster.opts.default (which, by default, only has '-i' -- no -S) file
is used for postmaster startup options, rather than passing them on the command
line. The changelog notice for this was buried back in the beta cycle release
announcements -- I should have duplicated all notices for the 7.0-1 release
announcement.
More documentation will be written as I have time (or input to README.rpm, or
patches to README.rpm).....
Look at the new initscript, then let me know about possible improvements (of
which I am sure improvements can be made!). Currently stderr and stdout
from pg_ctl are piped to /dev/null, but that is easy enough to change. And, by
changing the PGDATA/pg_options file's contents, you can turn on syslog -- edit
/etc/syslog.conf to get syslogging working -- just watch out for long queries!
Logging is one of the hot issues in the RPMset right now, as the comments about
syslog in the -2 release announcement show. The real problem with redirecting
the postmaster output is the issue of log rolling, which is impossible
to do in the 'classic' stderr/stdout redirect UNLESS you throw down postmaster
when rolling the log (unless you know a trick I don't).
I am trying to get _real_ logging, by way of syslog, rather than with redirects
-- however, the redhat syslog dies under long queries (such as the one issued
by psql in response to a \d directive).
Since some things were missed in the beta cycle's announcements (which only
were sent to pgsql-hackers), notice that the new 7.0 RPMset will create a new
PGDATA in /var/lib/pgsql/data instead of /var/lib/pgsql. There are other
changes -- read /usr/doc/postgresql-7.0/README.rpm and the pgsql-hackers
archives on the subject.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11