From: | Amit Kapila <akapila(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Prohibit pushing subqueries containing window function calculati |
Date: | 2018-09-04 05:51:32 |
Message-ID: | E1fx4FQ-0000G3-B4@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Prohibit pushing subqueries containing window function calculation to
workers.
Allowing window function calculation in workers leads to inconsistent
results because if the input row ordering is not fully deterministic, the
output of window functions might vary across workers. The fix is to treat
them as parallel-restricted.
In the passing, improve the coding pattern in max_parallel_hazard_walker
so that it has a chain of mutually-exclusive if ... else if ... else if
... else if ... IsA tests.
Reported-by: Marko Tiikkaja
Bug: 15324
Author: Amit Kapila
Reviewed-by: Tom Lane
Backpatch-through: 9.6
Discussion: https://postgr.es/m/CAL9smLAnfPJCDUUG4ckX2iznj53V7VSMsYefzZieN93YxTNOcw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/14e9b2a752efaa427ce1b400b9aaa5a636898a04
Modified Files
--------------
src/backend/optimizer/util/clauses.c | 16 +++++++++++++++-
src/test/regress/expected/select_parallel.out | 26 ++++++++++++++++++++++++++
src/test/regress/sql/select_parallel.sql | 6 ++++++
3 files changed, 47 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-09-04 14:52:07 | pgsql: Clean up after TAP tests in oid2name and vacuumlo. |
Previous Message | Amit Kapila | 2018-09-04 03:25:11 | pgsql: During the split, set checksum on an empty hash index page. |