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 1h07Zt-0006IO-3T for pgsql-performance@arkaria.postgresql.org; Sat, 02 Mar 2019 16:33:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h07Zq-0006yA-SM for pgsql-performance@arkaria.postgresql.org; Sat, 02 Mar 2019 16:33:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h07Zq-0006y3-KV for pgsql-performance@lists.postgresql.org; Sat, 02 Mar 2019 16:33:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h07Zo-0008HB-DU for pgsql-performance@postgresql.org; Sat, 02 Mar 2019 16:33:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x22GXJmd018365; Sat, 2 Mar 2019 11:33:19 -0500 From: Tom Lane To: Justin Pryzby cc: ROS Didier , pgsql-performance@postgresql.org, legrand_legrand@hotmail.com Subject: Re: How to get the content of Bind variables In-reply-to: <20190302155638.GA29584@telsasoft.com> References: <20190302155638.GA29584@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Sat, 02 Mar 2019 09:56:38 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18363.1551544399.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 02 Mar 2019 11:33:19 -0500 Message-ID: <18364.1551544399@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin Pryzby writes: > On Fri, Mar 01, 2019 at 06:47:06PM +0000, ROS Didier wrote: >> log_line_prefix =3D '%t [%p]: [%l-1] [%x] user=3D%u,db=3D%d,client=3D%h= ' > On Sat, Mar 02, 2019 at 01:14:44PM +0000, ROS Didier wrote: >> 2019-03-01 14:53:37 CET [24803]: [129-1] [3686] user=3Dpgbd_preint_sg2,= db=3Dpgbd_preint_sg2 LOG: process 24803 still waiting for ShareLock on tr= ansaction 3711 after 1000.476 ms >> 2019-03-01 14:53:37 CET [24803]: [130-1] [3686] user=3Dpgbd_preint_sg2,= db=3Dpgbd_preint_sg2 DETAIL: Process holding the lock: 24786. Wait queue:= 24803. >> 2019-03-01 14:53:37 CET [24803]: [131-1] [3686] user=3Dpgbd_preint_sg2,= db=3Dpgbd_preint_sg2 CONTEXT: while rechecking updated tuple (3,33) in re= lation "t_shared_liste_valeurs" >> 2019-03-01 14:53:37 CET [24803]: [132-1] [3686] user=3Dpgbd_preint_sg2,= db=3Dpgbd_preint_sg2 STATEMENT: update t_shared_liste_valeurs set deletio= n_date=3D$1, deletion_login=3D$2, modification_date=3D$3, modification_log= in=3D$4, administrable=3D$5, libelle=3D$6, niveau=3D$7 where code=3D$8 > I just realized that your log is showing "STATEMENT: [...]" which I thi= nk > means that's using libpq PQexec (simple query protocol), which means it = doesn't > use or support bind parameters at all. No, what's shown above is a case of the current statement being printed as detail for some log message (a log_lock_waits message in this case). This has nothing to do with whether statement logging is on overall. I now realize that what the OP is probably wishing for is that bind parameter values would be included as a detail line in messages other than log_all_statements or statement-duration messages. Sorry, that feature doesn't exist, and there'd be pretty serious technical impediments to making it happen. regards, tom lane