Re: logging blemishes

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logging blemishes
Date: 2005-09-21 01:31:35
Message-ID: 4330B7F7.4030501@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

>Andrew Dunstan wrote:
>
>
>>While preparing for a presentation, I noticed some mildly ugly effects
>>with log_line_prefix during session startup if log_connections is turned on.
>>
>>Example (log_line_prefix = '%t %q%u(at)%d %r %p %c:%l'):
>>
>>2005-09-19 19:16:39 EDT [unknown](at)[unknown] 6541 432f46d7.198d:1 LOG:
>>connection received: host=[local] port=
>>
>>
>>Anyway, currently, we test for "stop producing output here" with the
>>following code in elog.c:
>>
>> case 'q':
>> /* in postmaster and friends, stop if %q is seen */
>> /* in a backend, just ignore */
>> if (MyProcPort == NULL)
>> i = format_len;
>> break;
>>
>>I'm wondering if we should extend that test slightly, to something like
>>
>> if (MyProcPort == NULL || MyProcPort->username == NULL
>>|| *(MyProcPort->username) == '\0')
>>
>>
>
>Interesting, but I would like to find a need to add those tests.
>
>
>

In the case above, I rather expected %q to kick in. With the additional
tests it would.

It's debatable, though, and not hugely important either way, I think.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 2005-09-21 05:01:37 Re: passing parameters to CREATE INDEX
Previous Message Jim C. Nasby 2005-09-20 23:13:54 Re: DISTINCT vs. GROUP BY