ChrisXuzhou opened a new issue, #1195:
URL: https://github.com/apache/incubator-answer/issues/1195

   ## Describe the bug
   
   Problem:
   Using pgbouncer's transaction mode (port 6543) instead of session mode 
causes critical issues:
   
   Parameter Binding Error
   
   Error message "bind message supplies 4 parameters, but prepared statement 
requires 1" typically occurs when pgbouncer creates new connections for each 
query. 
   
   This breaks XORM's parameter binding mechanism, causing a mismatch in the 
number of parameters expected by the prepared statement. (It seems assuming 
session state persistence)
   
   Example error:
   
   > bind message supplies 4 parameters, but prepared statement requires 1
   
   For the Query: "SELECT \"id\", \"created_at\", \"updated_at\", \"user_id\", 
\"invite_user_id\", \"last_edit_user_id\", \"title\", \"original_text\", 
\"parsed_text\", \"pin\", \"show\", \"status\", \"view_count\", 
\"unique_view_count\", \"vote_count\", \"answer_count\", \"hot_score\", 
\"collection_count\", \"follow_count\", \"accepted_answer_id\", 
\"last_answer_id\", \"post_update_time\", \"revision_id\" FROM \"question\" 
WHERE \"question\".\"status\" IN ($1,$2) AND (question.show = $3) AND 
(question.created_at > $4) ORDER BY question.pin desc,question.hot_score DESC 
LIMIT 6"
   
   ### To Reproduce
   
   Steps to reproduce the behavior:
   
   1. Brand new system being set up with an transaction mode postgresdb
   
   ### Expected behavior
   
   5xx error report
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to