Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
14a254fb
Commit
14a254fb
authored
Jun 07, 2016
by
Noah Misch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test parallel query essentials in "make check".
Clément Prévost and Peter Eisentraut
parent
c588df99
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
1 deletion
+85
-1
src/test/regress/expected/select_parallel.out
src/test/regress/expected/select_parallel.out
+54
-0
src/test/regress/parallel_schedule
src/test/regress/parallel_schedule
+1
-1
src/test/regress/serial_schedule
src/test/regress/serial_schedule
+1
-0
src/test/regress/sql/select_parallel.sql
src/test/regress/sql/select_parallel.sql
+29
-0
No files found.
src/test/regress/expected/select_parallel.out
0 → 100644
View file @
14a254fb
--
-- PARALLEL
--
-- Serializable isolation would disable parallel query, so explicitly use an
-- arbitrary other level.
begin isolation level repeatable read;
-- setup parallel test
set parallel_setup_cost=0;
set parallel_tuple_cost=0;
explain (costs off)
select count(*) from a_star;
QUERY PLAN
-----------------------------------------------------
Finalize Aggregate
-> Gather
Workers Planned: 1
-> Partial Aggregate
-> Append
-> Parallel Seq Scan on a_star
-> Parallel Seq Scan on b_star
-> Parallel Seq Scan on c_star
-> Parallel Seq Scan on d_star
-> Parallel Seq Scan on e_star
-> Parallel Seq Scan on f_star
(11 rows)
select count(*) from a_star;
count
-------
50
(1 row)
set force_parallel_mode=1;
explain (costs off)
select stringu1::int2 from tenk1 where unique1 = 1;
QUERY PLAN
-----------------------------------------------
Gather
Workers Planned: 1
Single Copy: true
-> Index Scan using tenk1_unique1 on tenk1
Index Cond: (unique1 = 1)
(5 rows)
do $$begin
-- Provoke error in worker. The original message CONTEXT contains a worker
-- PID that must be hidden in the test output. PL/pgSQL conveniently
-- substitutes its own CONTEXT.
select stringu1::int2 from tenk1 where unique1 = 1;
end$$;
ERROR: invalid input syntax for integer: "BAAAAA"
CONTEXT: SQL statement "select stringu1::int2 from tenk1 where unique1 = 1"
PL/pgSQL function inline_code_block line 5 at SQL statement
rollback;
src/test/regress/parallel_schedule
View file @
14a254fb
...
...
@@ -92,7 +92,7 @@ test: brin gin gist spgist privileges init_privs security_label collate matview
test: alter_generic alter_operator misc psql async dbsize misc_functions
# rules cannot run concurrently with any test that creates a view
test: rules psql_crosstab
test: rules psql_crosstab
select_parallel
# ----------
# Another group of parallel tests
...
...
src/test/regress/serial_schedule
View file @
14a254fb
...
...
@@ -125,6 +125,7 @@ test: dbsize
test: misc_functions
test: rules
test: psql_crosstab
test: select_parallel
test: select_views
test: portals_p2
test: foreign_key
...
...
src/test/regress/sql/select_parallel.sql
0 → 100644
View file @
14a254fb
--
-- PARALLEL
--
-- Serializable isolation would disable parallel query, so explicitly use an
-- arbitrary other level.
begin
isolation
level
repeatable
read
;
-- setup parallel test
set
parallel_setup_cost
=
0
;
set
parallel_tuple_cost
=
0
;
explain
(
costs
off
)
select
count
(
*
)
from
a_star
;
select
count
(
*
)
from
a_star
;
set
force_parallel_mode
=
1
;
explain
(
costs
off
)
select
stringu1
::
int2
from
tenk1
where
unique1
=
1
;
do
$$
begin
-- Provoke error in worker. The original message CONTEXT contains a worker
-- PID that must be hidden in the test output. PL/pgSQL conveniently
-- substitutes its own CONTEXT.
select
stringu1
::
int2
from
tenk1
where
unique1
=
1
;
end
$$
;
rollback
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment