From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: log_line_info |
Date: | 2004-03-09 04:40:39 |
Message-ID: | 200403090440.i294edo24833@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Andrew Dunstan wrote:
>
> I think this is now ready for application, unless someone objects.
>
> Since the last patch I posted, I have done the following:
>
> . changed the escapes to lower case, as Peter prefers. This is also in
> line with what Apache does, which is the nearest equivalent I can think of.
> . added 2 new escapes: %r = remote host and port and %x says "postmaster
> and friends stop here". Postmaster and friends will also ignore any
> escapes they see that don't make sense (specifically %u %d %i %r %s and
> %c). However, they no longer ignore the whole facility. This means we
> can use it for logging (for example) timestamps and pids in all cases.
> . added docco
> . changed source port reporting from host:port to host(port) to avoid
> IP6 address ambiguity.
>
> If someone wants to monkey with the name of the facility, it shouldn't
> be hard. I don't like plain "log_line", though. "log_line_prefix" or
> "log_line_tag" both seem to me better alternatives.
>
> After this is applied (fingers crossed) and everyone is happy, I will
> submit a patch to remove log_timestamp, log_pid and (if we are agreed on
> it) log_source_port.
I have applied this patch. It will be a great addition to PostgreSQL.
I made a few modifications. I reordered the options in the docs and
postgresql.conf, e.g.:
+ #log_line_prefix = '' # e.g. '<%u%%%d> '
+ # %u=user name %d=database name
+ # %r=remote host and port
+ # %p=PID %t=timestamp %i=command tag
+ # %c=session id %l=session line number
+ # %s=session start timestamp
+ # %x=stop here in non-session processes
+ # %%='%'
I also changed:
*** src/include/miscadmin.h 10 Feb 2004 03:42:45 -0000 1.153
--- src/include/miscadmin.h 29 Feb 2004 17:49:07 -0000
***************
*** 24,29 ****
--- 24,31 ----
#define MISCADMIN_H
+ #include "libpq/libpq-be.h"
(wouldn't compile) to:
*** src/backend/utils/misc/ps_status.c 22 Feb 2004 21:26:55 -0000
1.17
--- src/backend/utils/misc/ps_status.c 9 Mar 2004 04:33:35 -0000
***************
*** 26,31 ****
--- 26,32 ----
#include <crt_externs.h>
#endif
+ #include "libpq/libpq.h"
#include "miscadmin.h"
#include "utils/ps_status.h"
for use of "Port".
--
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
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 16.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-09 04:46:05 | Re: log_line_info |
Previous Message | Lamar Owen | 2004-03-09 04:03:33 | Re: 7.4.2 packaged ... |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-09 04:46:05 | Re: log_line_info |
Previous Message | ljb | 2004-03-09 01:45:39 | libpq v2 protocol error: COPY FROM STDIN, PQputCopyEnd() |