* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2017 PgPool Global Development Group
+ * Copyright (c) 2003-2018 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
parse_msg = pool_get_sent_message('P', pstmt_name, POOL_SENT_MESSAGE_CREATED);
if (!parse_msg)
{
- ereport(ERROR,
+ ereport(FATAL,
(errmsg("unable to bind"),
errdetail("cannot get parse message \"%s\"", pstmt_name)));
}
query_context = parse_msg->query_context;
if (!query_context)
{
- ereport(ERROR,
+ ereport(FATAL,
(errmsg("unable to bind"),
errdetail("cannot get the query context")));
}
}
if (string == NULL)
- ereport(ERROR,
+ ereport(FATAL,
(errmsg("unable to copy data rows"),
errdetail("cannot read string message from backend")));
--- /dev/null
+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 1308 )
+read_it: read(2) returns error Connection reset by peer
--- /dev/null
+# Test data for FATAL: unable to bind DETAIL: cannot get parse message
+# "S1". This caused hang up of Pgpool-II.
+
+##backend_weight0 = 1
+##backend_weight1 = 0
+
+# Create test table
+'Q' "DROP TABLE IF EXISTS pgproto_test1"
+'Y'
+'Q' "CREATE TABLE pgproto_test1(i INT)"
+'Y'
+
+# Start a transaction
+'P' "" "BEGIN" 0
+'B' "" "S1" 0 0 0
+'E' "" 0
+
+# Issue INSERT
+'P' "" "INSERT INTO pgproto_test1 VALUES(1)" 0
+'B' "" "" 0 0 0
+'E' "" 0
+
+# Issue COMMIT
+'P' "" "COMMIT" 0
+'B' "" "" 0 0 0
+'E' "" 0
+'S'
+'Y'
+
+# DROP test table
+'Q' "DROP TABLE pgproto_test1"
+'Y'
+
+'X'