Re: WIP patch - INSERT-able log statements

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: WIP patch - INSERT-able log statements
Date: 2007-02-19 16:43:22
Message-ID: 20070219164322.GS28395@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Guillaume Smet escribió:
> On 2/19/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> >I don't think the syslog option is so nice to use these days; the
> >redirect_stderr stuff is more powerful and easy to use.
>
> Did you already analyze logs of a highly loaded platform using stderr?
> It's impossible to guarantee the consistency of the queries because
> you can have:
> Query 1 Line 1
> Query 2 Line 1
> Query 3 Line 1
> Query 1 Line 2
> Query 2 Line 2
> Query 1 Line 3
> Query 3 Line 2
> (each query is run on a different backend). With stderr you don't have
> sufficient information to know the query you should append the text
> to. Syslog adds useful context information (pid, command line, command
> number) which allows you to guarantee the consistency.

So add the session ID (%c) to log_line_prefix.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-02-19 16:52:28 Re: Chatter on DROP SOMETHING IF EXISTS
Previous Message Alvaro Herrera 2007-02-19 16:34:03 Re: pg_proc without oid?

Browse pgsql-patches by date

  From Date Subject
Next Message Guillaume Smet 2007-02-19 17:00:17 Re: WIP patch - INSERT-able log statements
Previous Message Guillaume Smet 2007-02-19 16:21:52 Re: WIP patch - INSERT-able log statements