[pgpool-hackers: 3229] Imcompatible behavior with PostgreSQL

Tatsuo Ishii ishii at sraoss.co.jp
Wed Feb 6 12:02:45 JST 2019


Currently Pgpool-II does not behave same as PostgreSQL if non existing
prepared statement is given. As shown below, Pgpool-II sends fatal
error message then terminates the connection to frontend, while
PostgreSQL returns an error and continues the process. Do we want to
fix this?

PostgreSQL:
FE=> Query (query="DROP TABLE IF EXISTS pgproto_test1")
<= BE CommandComplete(DROP TABLE)
<= BE ReadyForQuery(I)
FE=> Query (query="CREATE TABLE pgproto_test1(i INT)")
<= BE CommandComplete(CREATE TABLE)
<= BE ReadyForQuery(I)
FE=> Parse(stmt="", query="BEGIN")
FE=> Bind(stmt="S1", portal="")
FE=> Execute(portal="")
FE=> Parse(stmt="", query="INSERT INTO pgproto_test1 VALUES(1)")
FE=> Bind(stmt="", portal="")
FE=> Execute(portal="")
FE=> Parse(stmt="", query="COMMIT")
FE=> Bind(stmt="", portal="")
FE=> Execute(portal="")
FE=> Sync
<= BE ParseComplete
<= BE ErrorResponse(S ERROR V ERROR C 26000 M prepared statement "S1" does not exist F prepare.c L 515 R FetchPreparedStatement )
<= BE ReadyForQuery(I)
FE=> Query (query="DROP TABLE pgproto_test1")
<= BE CommandComplete(DROP TABLE)
<= BE ReadyForQuery(I)
FE=> Terminate

Pgpool-II:
FE=> Query (query="DROP TABLE IF EXISTS pgproto_test1")
<= BE NoticeResponse(S NOTICE V NOTICE C 00000 M table "pgproto_test1" does not exist, skipping F tablecmds.c L 914 R DropErrorMsgNonExistent )
<= BE CommandComplete(DROP TABLE)
<= BE ReadyForQuery(I)
FE=> Query (query="CREATE TABLE pgproto_test1(i INT)")
<= BE CommandComplete(CREATE TABLE)
<= BE ReadyForQuery(I)
FE=> Parse(stmt="", query="BEGIN")
FE=> Bind(stmt="S1", portal="")
FE=> Execute(portal="")
FE=> Parse(stmt="", query="INSERT INTO pgproto_test1 VALUES(1)")
FE=> Bind(stmt="", portal="")
FE=> Execute(portal="")
FE=> Parse(stmt="", query="COMMIT")
FE=> Bind(stmt="", portal="")
FE=> Execute(portal="")
FE=> Sync
<= BE ErrorResponse(S FATAL C XX000 M unable to bind D cannot get parse message "S1" F pool_proto_modules.c L 1324 )
read_it: read(2) returns error Connection reset by peer

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list