Commit 396676b0 authored by Michael Paquier's avatar Michael Paquier

Enforce non-parallel plan when calling current_schema() in newly-added test

current_schema() gets called in the recently-added regression test from
c5660e0a, 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
parent 251f5746
...@@ -360,8 +360,11 @@ prepare transaction 'twophase_tab'; ...@@ -360,8 +360,11 @@ prepare transaction 'twophase_tab';
ERROR: cannot PREPARE a transaction that has operated on temporary tables ERROR: cannot PREPARE a transaction that has operated on temporary tables
-- Corner case: current_schema may create a temporary schema if namespace -- Corner case: current_schema may create a temporary schema if namespace
-- creation is pending, so check after that. First reset the connection -- 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 - \c -
SET max_parallel_workers = 0;
SET max_parallel_workers_per_gather = 0;
SET search_path TO 'pg_temp'; SET search_path TO 'pg_temp';
BEGIN; BEGIN;
SELECT current_schema() ~ 'pg_temp' AS is_temp_schema; SELECT current_schema() ~ 'pg_temp' AS is_temp_schema;
......
...@@ -274,8 +274,11 @@ prepare transaction 'twophase_tab'; ...@@ -274,8 +274,11 @@ prepare transaction 'twophase_tab';
-- Corner case: current_schema may create a temporary schema if namespace -- Corner case: current_schema may create a temporary schema if namespace
-- creation is pending, so check after that. First reset the connection -- 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 - \c -
SET max_parallel_workers = 0;
SET max_parallel_workers_per_gather = 0;
SET search_path TO 'pg_temp'; SET search_path TO 'pg_temp';
BEGIN; BEGIN;
SELECT current_schema() ~ 'pg_temp' AS is_temp_schema; SELECT current_schema() ~ 'pg_temp' AS is_temp_schema;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment