postmaster logfile
What's a good way to start the postmaster, send the log info to a
logfile somewhere, and return the linux prompt?
v8.2.0 on suse64
Thanks
-dave
On Dec 3, 2007 2:35 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
What's a good way to start the postmaster, send the log info to a logfile
somewhere, and return the linux prompt?
Use whatever startup script comes with the pacakge for your OS. I.e.
in redhat or suse you should have a postgresql script that lives in
/etc/init.d/ that gets symlinked to the appropriate /etc/rc.d/rcx.d
directory.
v8.2.0 on suse64
You should really be running at least 8.2.4, preferable 8.2.5. 8.2.0
has some nasty bugs.
Well, I can start the server with....
postmaster -D /myplace/db
... and then...
^z
bg
... to get to the prompt. But each/every time a message from the
postmaster gets logged, it goes to stdout of the current window. I want
it to go to a logfile. Attempts to redirect with "&" all seem to fail.
"postmaster -d myplace/db -l logfile start" (as was in the message right
after the initial db create) doesn't seem to work.
I'll request v8.2.5. Thanks for the advise.
-dave
-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Monday, December 03, 2007 4:13 PM
To: Gauthier, Dave
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] postmaster logfile
On Dec 3, 2007 2:35 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
What's a good way to start the postmaster, send the log info to a
logfile
somewhere, and return the linux prompt?
Use whatever startup script comes with the pacakge for your OS. I.e.
in redhat or suse you should have a postgresql script that lives in
/etc/init.d/ that gets symlinked to the appropriate /etc/rc.d/rcx.d
directory.
v8.2.0 on suse64
You should really be running at least 8.2.4, preferable 8.2.5. 8.2.0
has some nasty bugs.
Gauthier, Dave escribió:
Well, I can start the server with....
postmaster -D /myplace/db
... and then...
^z
bg... to get to the prompt. But each/every time a message from the
postmaster gets logged, it goes to stdout of the current window. I want
it to go to a logfile. Attempts to redirect with "&" all seem to fail.
"postmaster -d myplace/db -l logfile start" (as was in the message right
after the initial db create) doesn't seem to work.
Enable the redirect_stderr config option in postgresql.conf. That
should do the trick. You can change the log file name and directory
on postgresql.conf too.
initdb doesn't say you can use -l in postmaster; it is talking about
pg_ctl.
--
Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4
"MySQL is a toy compared to PostgreSQL." (Randal L. Schwartz)
(http://archives.postgresql.org/pgsql-general/2005-07/msg00517.php)