Re: serverlog function (log_destination file)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>, "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: serverlog function (log_destination file)
Date: 2004-06-07 14:31:42
Message-ID: 3049.1086618702@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> ... what about adding a GUC variable that can be used to specify an
> amount of shared memory to use as a fifo area in which a copy of the log
> output is stored for return to clients that might want it (accessing it
> via internal functions)?

No, that's a nonstarter, because having the postmaster log into shared
memory means that the postmaster probably goes down too anytime a
backend crashes. The shared area would have to have a mutual-exclusion
lock, and we definitely do not want the postmaster participating in any
lock protocols.

If I were trying to solve Andreas' problem, I'd pipe stderr to some
program that stores recent log output in a file that I know the location
of and can read from the hypothetical log-grabber function. Actually I
don't see that there's any need to involve Postgres itself in this issue
at all --- seems like the only agreement needed is between the GUI and
the postmaster launching script about where the log file is.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2004-06-07 14:34:59 Re: serverlog function
Previous Message Bruce Momjian 2004-06-07 14:07:39 Re: [pgsql-hackers-win32] Failures with windows port