FAQ

Lamar Owen writes:
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).
Yes. I think ultimately we will have to do some logging support code of
our own to make this work the way we want. My thought at the moment is
there's nothing wrong with logging to stderr, as long as there's some
code somewhere that periodically closes stderr and reopens it to a new
log file. There needn't be a lot of code involved, we just need a
well-thought-out spec for how it should work. Comments anyone?

regards, tom lane

Search Discussions

  • Peter Eisentraut at May 22, 2000 at 9:53 pm

    Palle Girgensohn writes:

    The real problem with redirecting the postmaster output is the issue
    of log rolling,
    I really enjoy using apache's rotatelogs program. stderr is
    redirected through a pipe to a very small and robust C program,
    rotatelogs, that takes as arguments number of seconds between
    log rotates and the log filename. Logs are rotated every
    argv[2] seconds. The rotatelogs program takes care of closing
    and reopening, and nothing has to done from the application,
    just start postmaster with '2>&1 | rotatelogs ...' at the end,
    and log to stderr.
    Now there's a good idea. Why don't we abduct that program and teach pg_ctl
    about it. (After all, we abducted that one as well. :)


    --
    Peter Eisentraut Sernanders väg 10:115
    peter_e@gmx.net 75262 Uppsala
    http://yi.org/peter-e/ Sweden
  • Roderick A. Anderson at May 22, 2000 at 11:14 pm

    On Mon, 22 May 2000, Peter Eisentraut wrote:

    Now there's a good idea. Why don't we abduct that program and teach pg_ctl
    about it. (After all, we abducted that one as well. :)
    Imitation is the sincerest form of flattery. Not to mention this is the
    bazar.


    Rod
    --
    Roderick A. Anderson
    raanders@altoplanos.net Altoplanos Information Systems, Inc.
    Voice: 208.765.6149 212 S. 11th Street, Suite 5
    FAX: 208.664.5299 Coeur d'Alene, ID 83814

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-ports @
categoriespostgresql
postedMay 22, '00 at 4:19a
activeMay 22, '00 at 11:14p
posts3
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase