diff --git a/contrib/babelfishpg_tds/src/backend/tds/tds.c b/contrib/babelfishpg_tds/src/backend/tds/tds.c index c00a694048..653011ae8d 100644 --- a/contrib/babelfishpg_tds/src/backend/tds/tds.c +++ b/contrib/babelfishpg_tds/src/backend/tds/tds.c @@ -155,7 +155,7 @@ typedef struct LocalTdsStatus } LocalTdsStatus; static TdsStatus *TdsStatusArray = NULL; -static TdsStatus *MyTdsStatusEntry; +static TdsStatus *MyTdsStatusEntry = NULL; static LocalTdsStatus *localTdsStatusTable = NULL; uint32_t MyTdsClientVersion = 0; @@ -446,9 +446,17 @@ tds_stats_shmem_shutdown(int code, Datum arg) return; /* Safety check ... shouldn't get here unless shmem is set up. */ - if (TdsStatusArray == NULL) + if (TdsStatusArray == NULL || MyTdsStatusEntry == NULL) return; + PGSTAT_BEGIN_WRITE_ACTIVITY(MyTdsStatusEntry); + + MyTdsStatusEntry->st_procpid = 0; /* mark invalid */ + + PGSTAT_END_WRITE_ACTIVITY(MyTdsStatusEntry); + + MyTdsStatusEntry = NULL; + return; } diff --git a/test/JDBC/upgrade/13_6/schedule b/test/JDBC/upgrade/13_6/schedule index 6696d3038c..bf67107a25 100644 --- a/test/JDBC/upgrade/13_6/schedule +++ b/test/JDBC/upgrade/13_6/schedule @@ -198,7 +198,7 @@ sys-datefirst sys-dm_exec_connections sys-dm_exec_connections-dep sys-dm_exec_sessions -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-dm_hadr_cluster sys-dm_hadr_database_replica_states sys-dm_os_host_info diff --git a/test/JDBC/upgrade/13_9/schedule b/test/JDBC/upgrade/13_9/schedule index 7114e18b3b..f8cf1b63c5 100644 --- a/test/JDBC/upgrade/13_9/schedule +++ b/test/JDBC/upgrade/13_9/schedule @@ -194,7 +194,7 @@ sys-datefirst sys-dm_exec_connections sys-dm_exec_connections-dep sys-dm_exec_sessions -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-dm_hadr_cluster sys-dm_hadr_database_replica_states sys-dm_os_host_info diff --git a/test/JDBC/upgrade/14_12/schedule b/test/JDBC/upgrade/14_12/schedule index b462ef763d..3fb94d1400 100644 --- a/test/JDBC/upgrade/14_12/schedule +++ b/test/JDBC/upgrade/14_12/schedule @@ -60,7 +60,7 @@ column_domain_usage constraint_column_usage select-strip-parens-before-15_5 sp_describe_first_result_set -#sys-host_name-before-15_8-or-16_4 TODO:BABEL-5414 +sys-host_name-before-15_8-or-16_4 SYSTEM_USER indexproperty sys-all_parameters @@ -240,7 +240,7 @@ sys-index_columns-dep sys-sp_databases-dep sys-syscolumns-dep sys-dm_exec_connections-dep -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-table_types-before-dep sys-all_sql_modules-dep_before_16_5 sys-sql_modules-dep_before_16_5 diff --git a/test/JDBC/upgrade/14_15/schedule b/test/JDBC/upgrade/14_15/schedule index c9fa1b79f8..33540554df 100644 --- a/test/JDBC/upgrade/14_15/schedule +++ b/test/JDBC/upgrade/14_15/schedule @@ -60,7 +60,7 @@ column_domain_usage constraint_column_usage select-strip-parens-before-15_5 sp_describe_first_result_set -#sys-host_name-before-15_8-or-16_4 TODO:BABEL-5414 +sys-host_name-before-15_8-or-16_4 SYSTEM_USER indexproperty sys-all_parameters @@ -240,7 +240,7 @@ sys-index_columns-dep sys-sp_databases-dep sys-syscolumns-dep sys-dm_exec_connections-dep -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-table_types-before-dep sys-all_sql_modules-dep_before_16_5 sys-sql_modules-dep_before_16_5 diff --git a/test/JDBC/upgrade/14_3/schedule b/test/JDBC/upgrade/14_3/schedule index 6bc61a5415..19ee0bfdef 100644 --- a/test/JDBC/upgrade/14_3/schedule +++ b/test/JDBC/upgrade/14_3/schedule @@ -208,7 +208,7 @@ sys-datefirst sys-dm_exec_connections sys-dm_exec_connections-dep sys-dm_exec_sessions -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-dm_hadr_cluster sys-dm_hadr_database_replica_states sys-dm_os_host_info diff --git a/test/JDBC/upgrade/14_5/schedule b/test/JDBC/upgrade/14_5/schedule index acc7f55389..37350911aa 100644 --- a/test/JDBC/upgrade/14_5/schedule +++ b/test/JDBC/upgrade/14_5/schedule @@ -214,7 +214,7 @@ sys-datefirst sys-dm_exec_connections sys-dm_exec_connections-dep sys-dm_exec_sessions -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-dm_hadr_cluster sys-dm_hadr_database_replica_states sys-dm_os_host_info @@ -236,7 +236,7 @@ sys-fulltext_stoplists sys-hash_indexes sys-has_perms_by_name sys-has_perms_by_name-dep -#sys-host_name-before-15_8-or-16_4 TODO:BABEL-5414 +sys-host_name-before-15_8-or-16_4 sys-identity_columns sys-identity_columns-dep sys-index_columns diff --git a/test/JDBC/upgrade/14_6/schedule b/test/JDBC/upgrade/14_6/schedule index 93e2e74f57..2a80e1ebbc 100644 --- a/test/JDBC/upgrade/14_6/schedule +++ b/test/JDBC/upgrade/14_6/schedule @@ -247,7 +247,7 @@ sys-default_constraints-dep sys-dm_exec_connections sys-dm_exec_connections-dep sys-dm_exec_sessions -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-dm_hadr_cluster sys-dm_hadr_database_replica_states sys-dm_os_host_info @@ -269,7 +269,7 @@ sys-fulltext_stoplists sys-hash_indexes sys-has_perms_by_name sys-has_perms_by_name-dep -#sys-host_name-before-15_8-or-16_4 TODO:BABEL-5414 +sys-host_name-before-15_8-or-16_4 sys-identity_columns sys-identity_columns-dep sys-index_columns diff --git a/test/JDBC/upgrade/15_2/schedule b/test/JDBC/upgrade/15_2/schedule index 8b43bf0893..157d85ba8f 100644 --- a/test/JDBC/upgrade/15_2/schedule +++ b/test/JDBC/upgrade/15_2/schedule @@ -270,7 +270,7 @@ sys-default_constraints-dep sys-dm_exec_connections sys-dm_exec_connections-dep sys-dm_exec_sessions -#sys-dm_exec_sessions-dep TODO:BABEL-5414 +sys-dm_exec_sessions-dep sys-dm_hadr_cluster sys-dm_hadr_database_replica_states sys-dm_os_host_info @@ -292,7 +292,7 @@ sys-fulltext_stoplists sys-hash_indexes sys-has_perms_by_name sys-has_perms_by_name-dep -#sys-host_name-before-15_8-or-16_4 TODO:BABEL-5414 +sys-host_name-before-15_8-or-16_4 sys-identity_columns sys-identity_columns-dep sys-index_columns