From 9583d1cae9affac5ea817096368947a2a87d7907 Mon Sep 17 00:00:00 2001 From: liushengsong Date: Thu, 7 May 2026 10:38:10 +0800 Subject: [PATCH] fix test stats --- src/test/regress/expected/stats.out | 3 +++ src/test/regress/sql/stats.sql | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/test/regress/expected/stats.out b/src/test/regress/expected/stats.out index a6eb01f0a53..65ff6f04a54 100644 --- a/src/test/regress/expected/stats.out +++ b/src/test/regress/expected/stats.out @@ -845,6 +845,7 @@ SELECT (n_tup_ins + n_tup_upd) > 0 AS has_data FROM gp_stat_all_tables_summary -- Test that sessions is incremented when a new session is started in pg_stat_database SELECT sessions AS db_stat_sessions FROM pg_stat_database WHERE datname = (SELECT current_database()) \gset \c +SET enable_parallel TO off; SELECT gp_stat_force_next_flush(); gp_stat_force_next_flush -------------------------- @@ -1455,6 +1456,7 @@ DROP TABLE test_io_shared; -- CBDB: CBDB use share buffer not local buffer.So extends with object = 'relation' not 'temp relation'. -- read/write will not count directly, result is false \c +SET enable_parallel TO off; SET temp_buffers TO 100; CREATE TEMPORARY TABLE test_io_local(a int, b TEXT); SELECT sum(extends) AS extends, sum(evictions) AS evictions, sum(writes) AS writes @@ -1644,6 +1646,7 @@ UPDATE brin_hot SET val = -3 WHERE id = 42; -- timeout to elapse, let's just start a new session. The old one will -- then send its stats before dying. \c - +SET enable_parallel TO off; SELECT wait_for_hot_stats(); wait_for_hot_stats -------------------- diff --git a/src/test/regress/sql/stats.sql b/src/test/regress/sql/stats.sql index 240472cf534..344632114ac 100644 --- a/src/test/regress/sql/stats.sql +++ b/src/test/regress/sql/stats.sql @@ -426,6 +426,7 @@ SELECT (n_tup_ins + n_tup_upd) > 0 AS has_data FROM gp_stat_all_tables_summary -- Test that sessions is incremented when a new session is started in pg_stat_database SELECT sessions AS db_stat_sessions FROM pg_stat_database WHERE datname = (SELECT current_database()) \gset \c +SET enable_parallel TO off; SELECT gp_stat_force_next_flush(); SELECT sessions > :db_stat_sessions FROM pg_stat_database WHERE datname = (SELECT current_database()); @@ -694,6 +695,7 @@ DROP TABLE test_io_shared; -- CBDB: CBDB use share buffer not local buffer.So extends with object = 'relation' not 'temp relation'. -- read/write will not count directly, result is false \c +SET enable_parallel TO off; SET temp_buffers TO 100; CREATE TEMPORARY TABLE test_io_local(a int, b TEXT); SELECT sum(extends) AS extends, sum(evictions) AS evictions, sum(writes) AS writes @@ -826,6 +828,7 @@ UPDATE brin_hot SET val = -3 WHERE id = 42; -- timeout to elapse, let's just start a new session. The old one will -- then send its stats before dying. \c - +SET enable_parallel TO off; SELECT wait_for_hot_stats(); select n_tup_upd from gp_stat_user_tables_summary where relid = ('brin_hot'::regclass::oid);