Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icwDc-0003Jx-1b for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Dec 2019 18:51:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icwDa-0003Y8-4z for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Dec 2019 18:51:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icwDZ-0003Y1-Eq for pgsql-hackers@lists.postgresql.org; Thu, 05 Dec 2019 18:51:13 +0000 Received: from mail-vk1-xa42.google.com ([2607:f8b0:4864:20::a42]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1icwDU-0006Hg-6o for pgsql-hackers@postgresql.org; Thu, 05 Dec 2019 18:51:12 +0000 Received: by mail-vk1-xa42.google.com with SMTP id m128so1468977vkb.5 for ; Thu, 05 Dec 2019 10:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=UCladzehOWZcl4usTPKLeP5Wx8nwmXNxlTwAEbPH5a4=; b=biIiixmAfIk2ol7/2JWbxh5O0w72VlPCWJ5mI+l/aqSzAe09wFom/ScCMUde+Llvez iSnC8Td81zqMWz4nVsFXCOP+Y//fevGgE3FmQuBFOzVCe32dkrQ3yIhuB4ry6WbqjKpT eyN/8+d9I0boVVZQuyRXWPulDTgGtlOFRmE3nns9qajv5SgHehUULmmqZeaDqCaz+Fya Bu88nRCb+MzX0JeeizLJCfWIR4aGhpWvy3G0usO7G0l3RXh4jHLcCxZLtLWfnmys38YT AAwzws5QwcZ93EahGaPFV9xWF9IXeMKH9k99a3gQ3lI0kshUhVnYMIHFJFm57GvpqPJW +MDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=UCladzehOWZcl4usTPKLeP5Wx8nwmXNxlTwAEbPH5a4=; b=PYy9tC3xTUgIzq7vtqgGCEzCAR3tV8zNeimrUKgWcLkFbJYHTJQd2skUAxrwmlijxH Ru51K1arwf2YPvjfhJs99zGpAZzh7OgKlSDtZ12891UKVEfMKtI/mLPreqlABNEF1L/u 45Cd8vqsp1992+H8fG9nxtr95RIluUrKSg8R7zik7QMxtdkfsjHUAih7Z3tgRQY7itDb FbBzj48kmujYUsI+NayVlZt/IVke+muo5bHpWTpbPuLCXM/7WdQFzuW/1st26ud74GCE eodUIFDaxFWVlo45NgX5KzbU2268PFvY1Wi9zHI2aRhUcmLIWEBuPYOnz6XAiaLKx8wo VhqA== X-Gm-Message-State: APjAAAVxnTmfKw0WKu+kR4ISGPFKoM5sl2TtXQmGLmaGvdtUru2r/v29 hELUK4V9bIE+ikFCXKR/c1PJGQ== X-Google-Smtp-Source: APXvYqy7tJPuwLxieM9w49uqsXyNrJzap078+2UP6uz2OpGnjQjGuCSr3FbmWNMYNBAsjLek6F5JpA== X-Received: by 2002:a1f:994f:: with SMTP id b76mr8125878vke.2.1575571867076; Thu, 05 Dec 2019 10:51:07 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id m23sm3959557vsp.3.2019.12.05.10.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 10:51:06 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 55E8E300803; Thu, 5 Dec 2019 15:33:36 -0300 (-03) Date: Thu, 5 Dec 2019 15:33:36 -0300 From: Alvaro Herrera To: Andres Freund Cc: Alexey Bashtanov , Peter Eisentraut , PostgreSQL Hackers Subject: Re: log bind parameter values on error Message-ID: <20191205183336.GA30063@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191205180325.2jscsekp34zzpvms@alap3.anarazel.de> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello On 2019-Dec-05, Andres Freund wrote: > On 2019-12-05 14:19:45 -0300, Alvaro Herrera wrote: > > What this does is set an error callback, which adds the parameter values > > in the DETAIL line. This is at odds with all existing error callbacks: > > they only add stuff to the CONTEXT string. The implication is that > > if an error site has a direct errdetail_log() and is run under this > > error stack, that site's detail is going to be lost and replaced by the > > "params" one. Currently there aren't many errdetail_log() lines, so it > > doesn't seem like a terrible problem. However, it's something to keep > > in mind. > > It'd not be too hard avoiding overwriting if we wanted. Hmm, maybe errdetail_log() ought to do that. However: if some place has errdetail() and then this introduces errdetail_log(), then the former is not included in the server log (only in the client log). > Makes me wonder though, if we ought to invent something similar to the > errdata fields we have for schema, table, etc... Hmm, perhaps we should do that. It avoids the problem altogether. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services