{
/* client exits */
case POOL_END:
+ case POOL_END_WITH_FRONTEND_ERROR:
/*
* do not cache connection if:
+ * frontend abnormally exits or
* pool_config->connection_cahe == 0 or
* database name is template0, template1, postgres or regression
*/
- if (pool_config->connection_cache == 0 ||
+ if (status == POOL_END_WITH_FRONTEND_ERROR ||
+ pool_config->connection_cache == 0 ||
!strcmp(sp->database, "template0") ||
!strcmp(sp->database, "template1") ||
!strcmp(sp->database, "postgres") ||
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2012 PgPool Global Development Group
+ * Copyright (c) 2003-2014 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
POOL_CONTINUE = 0,
POOL_IDLE,
POOL_END,
+ POOL_END_WITH_FRONTEND_ERROR,
POOL_ERROR,
POOL_FATAL,
POOL_DEADLOCK
if (pool_read(frontend, &fkind, 1) < 0)
{
pool_log("ProcessFrontendResponse: failed to read kind from frontend. frontend abnormally exited");
- return POOL_END;
+ return POOL_END_WITH_FRONTEND_ERROR;
}
pool_debug("ProcessFrontendResponse: kind from frontend %c(%02x)", fkind, fkind);