Commit 5bde165
committed
Switch function current_schema[s]() to be parallel-unsafe
When invoked for the first time in a session, current_schema() and
current_schemas() can finish by creating a temporary schema. Currently
those functions are parallel-safe, however if for a reason or another
they get launched across multiple parallel workers, they would fail when
attempting to create a temporary schema as temporary contexts are not
supported in this case.
The original issue has been spotted by buildfarm members crake and
lapwing, after commit c5660e0 has introduced the first regression tests
based on current_schema() in the tree. After that, 396676b has
introduced a workaround to avoid parallel plans but that was not
completely right either.
Catversion is bumped.
Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20190118024618.GF1883@paquier.xyz1 parent 6ca015f commit 5bde165
File tree
4 files changed
+7
-13
lines changed- src
- include/catalog
- test/regress
- expected
- sql
4 files changed
+7
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2787 | 2787 | | |
2788 | 2788 | | |
2789 | 2789 | | |
2790 | | - | |
2791 | | - | |
| 2790 | + | |
| 2791 | + | |
2792 | 2792 | | |
2793 | | - | |
2794 | | - | |
| 2793 | + | |
| 2794 | + | |
2795 | 2795 | | |
2796 | 2796 | | |
2797 | 2797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
| 363 | + | |
365 | 364 | | |
366 | | - | |
367 | | - | |
368 | 365 | | |
369 | 366 | | |
370 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
| 277 | + | |
279 | 278 | | |
280 | | - | |
281 | | - | |
282 | 279 | | |
283 | 280 | | |
284 | 281 | | |
| |||
0 commit comments