pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedconfiguring the postmaster.log
4+ messages / 3 participants
[nested] [flat]
* configuring the postmaster.log
@ 2007-01-11 12:07 Marc Mamin <M.Mamin@intershop.de>
0 siblings, 1 reply; 4+ messages in thread
From: Marc Mamin @ 2007-01-11 12:07 UTC (permalink / raw)
To: pgsql-admin
Hello,
I'm confused about the logging destination parameters in
postgresql.conf
My Problem is that the postmaster.log is getting too large and I want to
roll it (once per day)
Following parameters apply to optional postgresql...log.
log_rotation_age = 1440
log_filename = 'postgresql-%Y-%m-%d_%H.log'
Is there a way to use a similar definition for the postmaster.log ?
When I generate postgresql...log files, are log messages written in
both
postmaster.log and postgresql.log ?
I guess I don't understand the meaning of these two different logging
destination.
Moreover, I'm catching the error stream in a perl application to log
errors:
$sth = $dbh->prepare( "select ..." );
$sth->execute ()||
print (STDERR "PG error:" . $sth->errstr ."\n") && exit 1;
$sth->finish;
Will I still get the postgres error in perl if I set redirect_stderr =
on in postgresql.conf ?
Thanks,
Marc
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: configuring the postmaster.log
@ 2007-01-11 12:24 Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
parent: Marc Mamin <M.Mamin@intershop.de>
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shellam (Mailing Lists) @ 2007-01-11 12:24 UTC (permalink / raw)
To: Marc Mamin <M.Mamin@intershop.de>; +Cc: pgsql-admin
Marc Mamin wrote:
> Hello,
>
>
> I'm confused about the logging destination parameters in postgresql.conf
>
>
> My Problem is that the postmaster.log is getting too large and I want
> to roll it (once per day)
>
> Following parameters apply to optional postgresql...log.
>
>
> log_rotation_age = 1440
> log_filename = 'postgresql-%Y-%m-%d_%H.log'
>
>
> Is there a way to use a similar definition for the postmaster.log ?
That is for the postmaster log - AFAIK there's only one log destination
(syslog or a standard file.)
>
> When I generate postgresql...log files, are log messages written in both
> postmaster.log and postgresql.log ?
I've never come across there being two files - "log_filename" says where
log messages are written - there aren't two files (AFAIK).
Have you got an stderr redirect that sends all postmaster output on
stderr to your own log file? If so, set silent mode on the log
configuration in your postgresql.conf to get the same effect - only it
will appear in the main postgresql log file defined by log_filename.
>
> I guess I don't understand the meaning of these two different logging
> destination.
>
>
> Moreover, I'm catching the error stream in a perl application to log
> errors:
>
> $sth = $dbh->prepare( "select ..." );
> $sth->execute ()||
> print (STDERR "PG error:" . $sth->errstr ."\n") && exit 1;
> $sth->finish;
>
> Will I still get the postgres error in perl if I set redirect_stderr =
> on in postgresql.conf ?
Setting "redirect_stderr = on" will mean that all errors that would
normally appear on the console that started the Postmaster will be sent
to log_filename instead..
--
Andy Shellam
NetServe Support Team
the Mail Network
"an alternative in a standardised world"
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: configuring the postmaster.log
@ 2007-01-11 13:04 Marc Mamin <M.Mamin@intershop.de>
0 siblings, 1 reply; 4+ messages in thread
From: Marc Mamin @ 2007-01-11 13:04 UTC (permalink / raw)
To: Andy Shellam \(Mailing Lists\) <andy.shellam-lists@mailnetwork.co.uk>; +Cc: pgsql-admin
Sorry , my mistake:
The "postmaster.log" that I mentioned is defined in our Postgres start
script:
startproc -u <@DB_USER@> $PGSQL_BIN -D <@INSTALL_DIR@>/postgresql-data \
>> <@INSTALL_DIR@>/postgresql/postmaster.log 2>&1
Marc
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: configuring the postmaster.log
@ 2007-01-11 15:35 Tom Lane <tgl@sss.pgh.pa.us>
parent: Marc Mamin <M.Mamin@intershop.de>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2007-01-11 15:35 UTC (permalink / raw)
To: Marc Mamin <M.Mamin@intershop.de>; +Cc: Andy Shellam \(Mailing Lists\) <andy.shellam-lists@mailnetwork.co.uk>; pgsql-admin
"Marc Mamin" <M.Mamin@intershop.de> writes:
> Sorry , my mistake:
> The "postmaster.log" that I mentioned is defined in our Postgres start
> script:
> startproc -u <@DB_USER@> $PGSQL_BIN -D <@INSTALL_DIR@>/postgresql-data \
> <@INSTALL_DIR@>/postgresql/postmaster.log 2>&1
That file will be used until the postmaster has launched the
error-logger subprocess, and never again. There is no situation where
the same log message would be written to both places.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-01-11 15:35 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-11 12:07 configuring the postmaster.log Marc Mamin <M.Mamin@intershop.de>
2007-01-11 12:24 ` Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
2007-01-11 13:04 Re: configuring the postmaster.log Marc Mamin <M.Mamin@intershop.de>
2007-01-11 15:35 ` 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