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 1ixQY5-0000QS-B8 for pgsql-bugs@arkaria.postgresql.org; Fri, 31 Jan 2020 07:17:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixQY4-0000DE-7F for pgsql-bugs@arkaria.postgresql.org; Fri, 31 Jan 2020 07:17:04 +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 1ixIs2-0003v1-BR for pgsql-bugs@lists.postgresql.org; Thu, 30 Jan 2020 23:05:10 +0000 Received: from sonic310-25.consmr.mail.ne1.yahoo.com ([66.163.186.206]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ixIrv-0000TO-5j for pgsql-bugs@lists.postgresql.org; Thu, 30 Jan 2020 23:05:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1580425499; bh=fJUAGP0I/dvMDw1RiEeeiEj7zPA+JYqljseizZpzslo=; h=Date:From:To:Subject:References:From:Subject; b=VgNsMLRvdPIp2qytnBY3ZrgMNo/S/yUVxJ/CLoWfxIPWCNVG/7wbqBsejgrsIXwS+0rIS4bL6JQ5rKCp2Xi/09dIdDBtoWrviiGwrHc6Wjm+HWaB2SQeenFqzrTH/lMi2Nhkbve5lkN930LX49US4pB5Wa6S5dMRgztCgJyuGygLNOoKG2Mp74l32xymRKpuzPHaBs9OO/BFmDCiUEsA0GQ3zCnzinKGO1WXOLrR2An/OKdGd+cXQXJhYJzc7K/V2KDL2TWCFzbHgK4eZjPebCNmeCrQeLQb1rI66P6B+QCFdUP3Plx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VRRbCI79RmZSSgfTe9jGc shDQ6xAFde3knXdmz_xHcAQdUsS3a2fV41BOHm9Ey9VJjs3hNNHTy.naVAztIKYfzxRZevzpLUCz BubeFExpePK7a0zCxXD0meT5NuiSu7D81DgGtg0tC6VEIolQJA.qBlD2XJg8xBWFSURxF5cIIMvO Uv9kKJ9dBUp3teZ6ODa3eLjZ_lm1Vw9Q0AC7y4wI1dDSo8Ae054LvTR1Jm_Lgnn4JOcpxCTg94zN 1tXYLOKy4fzM6tCxdPlo_Z6m2Q63ZSwjtMotLBXPK6JT0PpehMxW4yg_K_P2vfjgtqm5a9xpqnXo _ViiJgKQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Thu, 30 Jan 2020 23:04:59 +0000 Date: Thu, 30 Jan 2020 23:04:57 +0000 (UTC) From: Ted Liu To: "pgsql-bugs@lists.postgresql.org" Message-ID: <1854294856.1773708.1580425497239@mail.yahoo.com> Subject: auto_explain logs ERROR: 08P01 for every query using bind variable MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1773707_533868988.1580425497237" References: <1854294856.1773708.1580425497239.ref@mail.yahoo.com> X-Mailer: WebService/1.1.15113 YMailNorrin Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36 Content-Length: 3361 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1773707_533868988.1580425497237 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To whom it may concern, For performance and security, most of our queries use bind variables. We al= so implemented auto_explain=C2=A0for tracking down un-optimized queries. Ou= r database supports a large application. During the work-hours, there are 3= 0,000+ queries executed every hour. PostgreSQL=C2=A0logs rotates every hour= and each log contains 30,000+ error message like below. 2020-01-27 00:00:03 UTC:xxx.xx.0.189(35556):xxxxxx@xxxxxxdb:[130756]:ERROR:= =C2=A0 ERROR: 08P01: bind message supplies 0 parameters, but prepared state= ment "..." requires 1=C2=A02020-01-27 00:00:03 UTC:xxx.xx.0.189(35558):xxxx= xx@xxxxxxdb:[130756]:LOCATION:=C2=A0 exec_bind_message, postgres.c:16012020= -01-27 00:00:03 UTC:xxx.xx.0.189(35558):xxxxxx@xxxxxxdb:[130756]:STATEMENT:= =C2=A0 EXPLAIN select ...,...,..,... from ... where ....=3D$1 These error messages are really=C2=A0overwhelming to us and they are not us= eful at all. In our opinion, these error messages should not be logged.=C2= =A0 Best Regards, Ted Liu =C2=A0 ------=_Part_1773707_533868988.1580425497237 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
To whom it may concern,

Fo= r performance and security, most of our queries use bind variables. We also= implemented auto_explain for tracking down un-optimized queries= . Our database supports a large application. During the work-hours, there a= re 30,000+ queries executed every hour. PostgreSQL logs rotates every = hour and each log contains 30,000+ error message like below.

2020-01-27 00:00:03 = UTC:xxx.xx.0.189(35556):xxxxxx@xxxxxxdb:[130756]:ERROR:  ERROR: 08P01: bind message supplies 0 parameters,= but prepared statement "..." requires 1 
2020= -01-27 00:00:03 UTC:xxx.xx.0.189(35558):xxxxxx@xxxxxxdb:[130756]:LOCATION:&= nbsp; exec_bind_message, postgres.c:1601
2020-01-27 00:00:03 UTC:= xxx.xx.0.189(35558):xxxxxx@xxxxxxdb:[130756]:STATEMENT:  EXPLAIN selec= t ...,...,..,... from ... where ....=3D$1

These error messages are really = overwhelming to us and they are not useful at all. In our opinion, these er= ror messages should not be logged. 

Best Regards,
=
Ted Liu=

 <= /span>
------=_Part_1773707_533868988.1580425497237--