Re: auto_explain logs ERROR: 08P01 for every query using bind variable

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: auto_explain logs ERROR: 08P01 for every query using bind variable
Дата
Msg-id CAMkU=1y7YWi4CYjou0hAw_6B7zRtQT9X4dYeJBjoR+aYYoTDRw@mail.gmail.com
обсуждение исходный текст
Ответ на auto_explain logs ERROR: 08P01 for every query using bind variable  (Ted Liu <ted_liu@yahoo.com>)
Ответы Re: auto_explain logs ERROR: 08P01 for every query using bindvariable  (Ted Liu <ted_liu@yahoo.com>)
Re: auto_explain logs ERROR: 08P01 for every query using bind variable  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Jan 31, 2020 at 2:14 AM Ted Liu <ted_liu@yahoo.com> wrote:
To whom it may concern,

For 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 are 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:  exec_bind_message, postgres.c:1601
2020-01-27 00:00:03 UTC:xxx.xx.0.189(35558):xxxxxx@xxxxxxdb:[130756]:STATEMENT:  EXPLAIN select ...,...,..,... from ... where ....=$1

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

I agree they shouldn't be logged.  And I don't get such messages when using auto_explain with something like `pgbench -M prepared`.

What version are you using?  What settings are you using for auto_explain?  What is your client language/driver?  Maybe the client is doing something weird like sending duplicate binds?

Cheers,

Jeff

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #16239: It is not possible to upgrade the password from md5to SCRAM
Следующее
От: Ted Liu
Дата:
Сообщение: Re: auto_explain logs ERROR: 08P01 for every query using bindvariable