Re: log_line_prefix additions

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: log_line_prefix additions
Date: 2005-06-09 22:28:44
Message-ID: 200506092228.j59MSi411411@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

qEd L. wrote:
> Attached also is a patch to comments in sample postgresql.conf file.
>
> Subject: [PATCHES] log_line_prefix additions
> Date: Wednesday August 25 2004 3:26
> From: "Ed L." <pgsql(at)bluepolka(dot)net>
> To: pgsql-patches(at)postgresql(dot)org
>
> This patch against 8.0.0beta1 source adds log_line_prefix options for
> millisecond timestamps (%m), remote host (%h), and remote port (%P). The
> milliseconds are useful for QPS measurements, and the remote port is
> worthless to us as part of %r.

OK, I have modified your patch and applied it. I changed gettimeofday()
to use NULL for timezone, as suggested by Andrew Dunstan. I also
modified the code to not print the very long timezone name on Win32,
just as we do with the current non-millisecond timezone example.

Because we already have a remote host and port specification, it seems
unnecessary to add a remote port only specification. I have removed the
%P/port part of your patch, so we have %r host/port and $h host-only.

One other approach would be to remove %r host/port, but %r has some
smarts about not printing the remote port number of it isn't available
(like unix sockets), and the remote port alone seems meaningless, so
this direction seems best.

(Some of these ideas are mine, some are Tom's.)

--
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 3.9 KB

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-06-09 23:27:47 Re: Show full path name when saving in psql
Previous Message Tom Lane 2005-06-09 22:01:35 Re: fix typo in postmaster.c