Re: Add new error_action COPY ON_ERROR "log" - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Add new error_action COPY ON_ERROR "log"
Date
Msg-id 20240318.120517.415116559504940156.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: Add new error_action COPY ON_ERROR "log"  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Add new error_action COPY ON_ERROR "log"
List pgsql-hackers
At Fri, 15 Mar 2024 16:57:25 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Wed, Mar 13, 2024 at 07:32:37PM +0530, Bharath Rupireddy wrote:
> > I'm attaching the v8 patch set implementing the above idea. With this,
> > [1] is sent to the client, [2] is sent to the server log. This
> > approach not only reduces the duplicate info in the NOTICE and CONTEXT
> > messages, but also makes it easy for users to get all the necessary
> > info in the NOTICE message without having to set extra parameters to
> > get CONTEXT message.
> 
> In terms of eliminating the information duplication while allowing
> clients to know the value, the attribute and the line involved in the
> conversion failure, the approach of tweaking the context information
> has merits, I guess.
> 
> How do others feel about this kind of tuning?

If required, I think that we have already included the minimum
information necessary for the primary diagnosis, including locations,
within the primary messages. Here is an example:

> LOG:  00000: invalid record length at 0/18049F8: expected at least 24, got 0

And I believe that CONTEXT, if it exists, is augmentation information
to the primary messages. The objective of the precedent for the use of
relname_only was somewhat different, but this use also seems legit.

In short, I think the distribution between message types (primary and
context) is fine as it is in the latest patch.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: PostgreSQL 17 Release Management Team & Feature Freeze
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed