postgres.git / summary / log / commit / refs
commit 1a7874fe4fe17c4d3a90586e7d84c4a75982fb29
Author: Melanie Plageman <melanieplageman@gmail.com>
Date: Wed Nov 18 18:30:32 2026 +0000
Fix pgstattuple test with forced parallel queries
Commit 8c15c2cb5c4 added a pgstattuple test using a temporary table.
When debug_parallel_query is set to regress, pgstattuple_approx() runs
in a parallel worker that cannot access the temporary table.
Disable forced parallel execution locally for this query.
Per buildfarm.
Backpatch-through: 15
contrib/pgstattuple/expected/pgstattuple.out | 3 +++
contrib/pgstattuple/sql/pgstattuple.sql | 3 +++
2 files changed, 6 insertions(+)
diff --git a/contrib/pgstattuple/expected/pgstattuple.out b/contrib/pgstattuple/expected/pgstattuple.out
index 32f055b2d53..74813d0c751 100644
--- a/contrib/pgstattuple/expected/pgstattuple.out
+++ b/contrib/pgstattuple/expected/pgstattuple.out
@@ -255,6 +255,8 @@ begin;
create temp table test_approx_unknown (id int);
copy test_approx_unknown from stdin with (freeze);
commit;
+begin;
+set local debug_parallel_query = off;
select scanned_percent, approx_tuple_count
from pgstattuple_approx('test_approx_unknown');
scanned_percent | approx_tuple_count
@@ -262,6 +264,7 @@ select scanned_percent, approx_tuple_count
0 | 0
(1 row)
+commit;
-- not for the index calls though, of course
select pgstatindex('test_partition');
ERROR: relation "test_partition" is not a btree index
diff --git a/contrib/pgstattuple/sql/pgstattuple.sql b/contrib/pgstattuple/sql/pgstattuple.sql
index 0853a23c985..9c543e68d94 100644
--- a/contrib/pgstattuple/sql/pgstattuple.sql
+++ b/contrib/pgstattuple/sql/pgstattuple.sql
@@ -114,8 +114,11 @@ copy test_approx_unknown from stdin with (freeze);
1
\.
commit;
+begin;
+set local debug_parallel_query = off;
select scanned_percent, approx_tuple_count
from pgstattuple_approx('test_approx_unknown');
+commit;
-- not for the index calls though, of course
select pgstatindex('test_partition');
[parent: 3b367aaa57a3]