Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNbTA-0002Nk-NK for pgsql-general@arkaria.postgresql.org; Tue, 07 Sep 2021 13:49:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mNbT7-0006ZD-N1 for pgsql-general@arkaria.postgresql.org; Tue, 07 Sep 2021 13:48:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNbT7-0006Z5-Dz for pgsql-general@lists.postgresql.org; Tue, 07 Sep 2021 13:48:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNbT4-0004mQ-P7 for pgsql-general@postgresql.org; Tue, 07 Sep 2021 13:48:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 187Dmq3E3168997; Tue, 7 Sep 2021 09:48:52 -0400 From: Tom Lane To: Raul Kaubi cc: pgsql-general@postgresql.org Subject: Re: How to log bind values for statements that produce errors In-reply-to: References: Comments: In-reply-to Raul Kaubi message dated "Tue, 07 Sep 2021 10:43:07 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3168995.1631022532.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Sep 2021 09:48:52 -0400 Message-ID: <3168996.1631022532@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Raul Kaubi writes: > We have a problem with certain select statement, which produces error an= d we would like to know the bind value that is given as parameter. > I have tried parameters: > log_min_duration_statement =3D 0 > log_parameter_max_length_on_error =3D -1 The other constraint on reporting parameters during error is that they have to be sent by the client in text not binary mode. I venture that your client is sending them in binary. (The reason for this restriction is to avoid the overhead of converting binary to text for every query, which we'd have to do in advance of knowing whether the query will throw an error.) regards, tom lane