pgpool2.git / summary / log / commit / refs
commit afbe7722978d3646c3be883a95045ce1993314c2
Author: Yugo Nagata <nagata@sraoss.co.jp>
Date: Fri Jun 08 05:36:06 2012 +0000
Fix to send an error message to the frontend when connection is terminated
due to conflict with recovery.
pool_process_query.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pool_process_query.c b/pool_process_query.c
index d8d2b6141..8ffd3ac61 100644
--- a/pool_process_query.c
+++ b/pool_process_query.c
@@ -4634,7 +4634,13 @@ SELECT_RETRY:
r = detect_serialization_error(CONNECTION(backend, i), MAJOR(backend), false);
if (r == SPECIFIED_ERROR)
{
- pool_log("connection on node %d was terminated due to conflict with recovery", i);
+ pool_error("connection on node %d was terminated due to conflict with recovery", i);
+ pool_send_fatal_message(frontend, MAJOR(backend),
+ SERIALIZATION_FAIL_ERROR_CODE,
+ "connection was terminated due to confilict with recovery",
+ "User was holding a relation lock for too long.",
+ "In a moment you should be able to reconnect to the database and repeat your command.",
+ __FILE__, __LINE__);
return POOL_ERROR;
}
[parent: f2f131e3dc05]