Default: 60
+==== drop_on_error ====
+
+If error appears from server, the connection will not be reused but dropped
+immediately. Set to 0 if errors from server are normal for your workflow.
+
+Default: 1
+
=== Dangerous timeouts ===
Setting following timeouts cause unexcpected errors.
* Move all "look-at-full-packet" situtations to SBUF_EV_PKT_CALLBACK
* auth_conn - access to pg_shadow, so auth_file is not needed
* maybe libevent calls should look at errno? (esp. event_del())
- * drop_on_error/keep_on_error - if released conn is in error state,
- then issue rollback and keep it
=== prepared plans ===
extern char *cf_pidfile;
extern char *cf_ignore_startup_params;
+extern int cf_drop_on_error;
extern char *cf_admin_users;
extern char *cf_stats_users;
int cf_server_round_robin = 0;
char *cf_ignore_startup_params = "";
+int cf_drop_on_error = 1;
usec_t cf_server_lifetime = 60*60*USEC;
usec_t cf_server_idle_timeout = 10*60*USEC;
{"server_round_robin", true, CF_INT, &cf_server_round_robin},
{"suspend_timeout", true, CF_TIME, &cf_suspend_timeout},
{"ignore_startup_parameters", true, CF_STR, &cf_ignore_startup_params},
+{"drop_on_error", true, CF_INT, &cf_drop_on_error},
{"pkt_buf", false, CF_INT, &cf_sbuf_len},
{"tcp_defer_accept", true, {cf_get_int, set_defer_accept}, &cf_tcp_defer_accept},
return false;
}
+ /* enforce close request */
+ if (server->close_needed) {
+ disconnect_server(server, true, "close_needed");
+ return false;
+ }
+
Assert(server->link == NULL);
slog_noise(server, "release_server: new state=%d", newstate);
change_server_state(server, newstate);
disconnect_server(server, true, "invalid server parameter");
return false;
}
+ if (cf_drop_on_error)
+ server->close_needed = 1;
+
case 'N': /* NoticeResponse */
break;