Re: [PROPOSAL] Client Log Output Filtering

From: David Steele <david(at)pgmasters(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] Client Log Output Filtering
Date: 2016-04-04 15:57:50
Message-ID: 57028EFE.9070402@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/4/16 11:21 AM, Tom Lane wrote:
> David Steele <david(at)pgmasters(dot)net> writes:
>> On 3/29/16 12:58 PM, Tom Lane wrote:
>>> ... Basically,
>>> my point is that LOG_ONLY achieves 95% of the benefit for probably
>>> 0.01% of the work.
>
>> Attached is a patch that re-purposes COMMERROR as LOG_SERVER_ONLY. I
>> went ahead and replaced all instances of COMMERROR with LOG_SERVER_ONLY.
>
> Uh, what? COMMERROR is a distinct concept in my opinion. It might happen
> to share the same implementation today, but that doesn't make it the
> same thing.

Fair enough.

> I had in mind a patch that simply added LOG_SERVER_ONLY as another define
> and did whatever seemed appropriate documentation-wise. I see no reason
> to touch the places that are currently dealing with client communication
> failures.

I still prefer to collapse them into a single value for the current
implementation. Otherwise there are several places that need to check
for both in elog.c and their behavior is identical (for now). For my 2c
it makes more sense to collapse COMMERROR into LOG_SERVER_ONLY since
that more accurately describes what it actually does in the elog code.

What do you think of the attached?

COMMERROR was not documented in sources.sgml so LOG_SERVER_ONLY wasn't
either. I'm happy to do that that though it's not clear to me where it
would go. I could just put it in the general description.

Thanks,
--
-David
david(at)pgmasters(dot)net

Attachment Content-Type Size
ereport-v5.patch text/plain 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2016-04-04 16:03:45 Yet another small patch - reorderbuffer.c:1099
Previous Message Robert Haas 2016-04-04 15:54:08 Re: SSL indicator in psql prompt