Re: [PATCHES] serverlog function (log_destination file)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] serverlog function (log_destination file)
Date: 2004-06-10 21:26:29
Message-ID: 200406102126.i5ALQTP03660@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andreas Pflug wrote:
> Sorry I didn't get back on this earlier, yesterday morning my internet
> access was literally struck by lightning, I'm running temporary hardware
> now.
>
> Bruce Momjian wrote:
>
> >>>>Looks good to me. The only issue I saw was that the default file name
> >>>>mentioned in postgresql.conf doesn't match the actual default.
> >>>>
> >>>>
>
> I'll fix the default filename difference, postgresql.log seems best.
> I'll add doc too.
>
> >One idea would be to send a message to stderr when this option is used
> >stating that everything is going to 'filename'.
> >
> >
> I can ereport LogFileOpen and LogFileClose, do we need this? Currently,
> only open problems will be reported.

Actually, my idea of sending a message to stderr saying we are using a
pre-configured file is so folks aren't surprised by the fact they can't
see any stderr anymore. But doesn't syslog have the same issue. Maybe
not, and that's why we need a message like:

"All standard output and standard error are going to postgresql.conf"

and send that to the processes standard error.

>
> >Also can we close/reopen the file on SIGHUP. My guess is we can't
> >because of all the backends accessing the output file.
> >
> >
> I'd also like it flushed in pg_logfile and pg_logfile_length, same
> problem; any hints welcome.

I don't understand this. I was thinking of close/reopen so log files
could be rotated.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-10 21:56:43 Re: [PATCHES] serverlog function (log_destination file)
Previous Message Tom Lane 2004-06-10 21:19:22 Re: More vacuum.c refactoring

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-06-10 21:56:43 Re: [PATCHES] serverlog function (log_destination file)
Previous Message Andreas Pflug 2004-06-10 20:54:54 Re: [PATCHES] serverlog function (log_destination file)