This avoids resetting global session information when DISCARD/RESET ALL is
executed. This can have bad effects, especially as seen from the 'guc' test
case where we fail to handle temp tables correctly. So we mark global_session
GUC with GUC_NO_RESET_ALL flag and instead issue an explicit RESET
global_session when connection is cleaned up.
PGXCNodeHandle *new_connections[handles->co_conn_count + handles->dn_conn_count];
int new_conn_count = 0;
int i;
- char *resetcmd = "RESET ALL;RESET SESSION AUTHORIZATION;"
- "RESET transaction_isolation;";
+ char *resetcmd = "RESET ALL;"
+ "RESET SESSION AUTHORIZATION;"
+ "RESET transaction_isolation;"
+ "RESET global_session";
elog(DEBUG5, "pgxc_node_remote_cleanup_all - handles->co_conn_count %d,"
"handles->dn_conn_count %d", handles->co_conn_count,
{"global_session", PGC_USERSET, UNGROUPED,
gettext_noop("Sets the global session identifier."),
NULL,
- GUC_IS_NAME | GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST
+ GUC_IS_NAME | GUC_REPORT | GUC_NO_RESET_ALL | GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST
},
&global_session_string,
"none",