aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-01-18 10:51:52 +0900
committerMichael Paquier <michael@paquier.xyz>2019-01-18 10:51:52 +0900
commit08b53281f4444efb2d5bcc44d6293b05d1aa1335 (patch)
tree4ae78b712b84694b0455e1b4b083f6a7b22043ec /src
parentb15160bc716e62ba0b30dc0ce35ab6cb82773707 (diff)
downloadpostgresql-08b53281f4444efb2d5bcc44d6293b05d1aa1335.tar.gz
postgresql-08b53281f4444efb2d5bcc44d6293b05d1aa1335.zip
Enforce non-parallel plan when calling current_schema() in newly-added test
current_schema() gets called in the recently-added regression test from c5660e0, and can be used in a parallel context, causing its call to fail when creating a temporary schema. Per buildfarm members crake and lapwing. Discussion: https://postgr.es/m/20190118005949.GD1883@paquier.xyz
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/temp.out5
-rw-r--r--src/test/regress/sql/temp.sql5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/test/regress/expected/temp.out b/src/test/regress/expected/temp.out
index e677d6b86fc..bba4a7ae565 100644
--- a/src/test/regress/expected/temp.out
+++ b/src/test/regress/expected/temp.out
@@ -360,8 +360,11 @@ prepare transaction 'twophase_tab';
ERROR: cannot PREPARE a transaction that has operated on temporary tables
-- Corner case: current_schema may create a temporary schema if namespace
-- creation is pending, so check after that. First reset the connection
--- to remove the temporary namespace.
+-- to remove the temporary namespace, and make sure that non-parallel plans
+-- are used.
\c -
+SET max_parallel_workers = 0;
+SET max_parallel_workers_per_gather = 0;
SET search_path TO 'pg_temp';
BEGIN;
SELECT current_schema() ~ 'pg_temp' AS is_temp_schema;
diff --git a/src/test/regress/sql/temp.sql b/src/test/regress/sql/temp.sql
index df7edd94103..d69a243fe74 100644
--- a/src/test/regress/sql/temp.sql
+++ b/src/test/regress/sql/temp.sql
@@ -274,8 +274,11 @@ prepare transaction 'twophase_tab';
-- Corner case: current_schema may create a temporary schema if namespace
-- creation is pending, so check after that. First reset the connection
--- to remove the temporary namespace.
+-- to remove the temporary namespace, and make sure that non-parallel plans
+-- are used.
\c -
+SET max_parallel_workers = 0;
+SET max_parallel_workers_per_gather = 0;
SET search_path TO 'pg_temp';
BEGIN;
SELECT current_schema() ~ 'pg_temp' AS is_temp_schema;