pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres 8.0 Log Configuration
2+ messages / 2 participants
[nested] [flat]

* Postgres 8.0 Log Configuration
@ 2005-01-21 16:15  Pallav Kalva <pkalva@deg.cc>
  0 siblings, 1 reply; 2+ messages in thread

From: Pallav Kalva @ 2005-01-21 16:15 UTC (permalink / raw)
  To: pgsql-admin

Hi,

    Whenever i start my postgres 8 server i do "pg_ctl restart -D 
/var/lib/pgsql/data -l /var/log/postgresql/postmaster"  where
/var/log/postgresql/ is the dir and postmaster is the output log file 
for all postgres logging and errors.  This above command works fine and 
logs all the postgres related messages into the specified filename.  But 
I dont want to specify the "-l /var/log/postgresql/postmaster" option 
everytime I start the postmaster. I want to set the logfile name in the 
postgresql.conf file, i used the following setting :

log_destination = 'syslog,stderr'
redirect_stderr = true
log_directory = '/var/lib/pgsql/'
log_filename = 'postmaster.log'

   But still whenever i start my postgres server some of the messages 
are not logged into the specified logfile name in the postgresq.conf 
file and it is printing the log messages on the command line like this :

$ pg_ctl restart -m f -D /var/lib/pgsql/data -o "-p 5432"
waiting for postmaster to shut down....2005-01-21 10:37:13 EST%% LOG:  
logger shutting down
 done
postmaster stopped
postmaster starting
$ 2005-01-21 10:37:15 EST%% LOG:  could not create IPv6 socket: Address 
family not supported by protocol

  I want all the postgres related messages to be logged into the file  
in "log_filename" parameter specified in postgresql.conf . I tried 
changing "log_destination" parameter to syslog only or stderr only but 
still no change.   am I missing something here ?  or this is not 
possible with the postgresql.conf

Thanks in advance.
Pallav




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Postgres 8.0 Log Configuration
@ 2005-01-23 03:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Pallav Kalva <pkalva@deg.cc>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-01-23 03:09 UTC (permalink / raw)
  To: Pallav Kalva <pkalva@deg.cc>; +Cc: pgsql-admin

Pallav Kalva <pkalva@deg.cc> writes:
>    But still whenever i start my postgres server some of the messages 
> are not logged into the specified logfile name in the postgresq.conf 
> file and it is printing the log messages on the command line like this :

> $ pg_ctl restart -m f -D /var/lib/pgsql/data -o "-p 5432"
> waiting for postmaster to shut down....2005-01-21 10:37:13 EST%% LOG:  
> logger shutting down
>  done
> postmaster stopped
> postmaster starting
> $ 2005-01-21 10:37:15 EST%% LOG:  could not create IPv6 socket: Address 
> family not supported by protocol

There are some messages that can get printed before redirect_stderr has
taken effect; in particular anything associated with problems in
postgresql.conf is likely to be so printed.  Also messages burped out by
the stderr redirection process come out that way (the "logger shutting
down" for instance).  So you still really have to have a small log file
that exists to catch startup messages.  I'd suggest continuing to use
"-l pgstartup.log" or some such.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-01-23 03:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-21 16:15 Postgres 8.0 Log Configuration Pallav Kalva <pkalva@deg.cc>
2005-01-23 03:09 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox