Re: postmaster logfile

Lists: pgsql-general
From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: postmaster logfile
Date: 2007-12-03 20:35:06
Message-ID: D7FF158337303A419CF4A183F48302D6036CABF5@hdsmsx411.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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


From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postmaster logfile
Date: 2007-12-03 21:13:04
Message-ID: dcc563d10712031313h77728bdci2dc316ba82f71700@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Dec 3, 2007 2:35 PM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)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.


From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: postmaster logfile
Date: 2007-12-03 21:25:46
Message-ID: D7FF158337303A419CF4A183F48302D6036CAC7C@hdsmsx411.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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(dot)marlowe(at)gmail(dot)com]
Sent: Monday, December 03, 2007 4:13 PM
To: Gauthier, Dave
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] postmaster logfile

On Dec 3, 2007 2:35 PM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)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.


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: postmaster logfile
Date: 2007-12-03 22:17:30
Message-ID: 20071203221730.GC27306@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

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)