create table foo as select i a, i b from generate_series(1, 10) i; CREATE 10 -- expect this query terminated by 'test pg_terminate_backend' 1&:create temp table t as select count(*) from foo where pg_sleep(20) is null; -- extract the pid for the previous query SELECT pg_terminate_backend(pid,'test pg_terminate_backend') FROM pg_stat_activity WHERE query like 'create temp table t as select%' ORDER BY pid LIMIT 1; pg_terminate_backend -------------------- t (1 row) -- EXPECT: session 1 terminated with 'test pg_terminate_backend' 1<: <... completed> FATAL: terminating connection due to administrator command: "test pg_terminate_backend" server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. -- query backend to ensure no PANIC on postmaster select count(*) from foo; count ----- 10 (1 row) -- -- SIGSEGV issue when freeing gangs -- CREATE EXTENSION IF NOT EXISTS gp_inject_fault; CREATE DROP TABLE IF EXISTS foo; DROP CREATE TABLE foo (c1 int, c2 int) DISTRIBUTED BY (c1); CREATE 10: BEGIN; BEGIN SELECT gp_inject_fault('create_gang_in_progress', 'reset', 1); gp_inject_fault --------------- t (1 row) SELECT gp_inject_fault('create_gang_in_progress', 'suspend', 1); gp_inject_fault --------------- t (1 row) 10&: SELECT * FROM foo a JOIN foo b USING (c2); SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE query = 'SELECT * FROM foo a JOIN foo b USING (c2);'; pg_terminate_backend -------------------- t (1 row) SELECT gp_inject_fault('create_gang_in_progress', 'resume', 1); gp_inject_fault --------------- t (1 row) 10<: <... completed> FATAL: terminating connection due to administrator command server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. 10q