pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Prohibit pushing subqueries containing window function calculati 4+ messages / 1 participants [nested] [flat]
* pgsql: Prohibit pushing subqueries containing window function calculati @ 2018-09-04 05:51 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Amit Kapila @ 2018-09-04 05:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f658235a448aa9462249f9d3448168be1e63a55f Modified Files -------------- src/backend/optimizer/util/clauses.c | 14 ++++++++++++++ src/test/regress/expected/select_parallel.out | 23 +++++++++++++++++++++++ src/test/regress/sql/select_parallel.sql | 5 +++++ 3 files changed, 42 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Prohibit pushing subqueries containing window function calculati @ 2018-09-04 05:51 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Amit Kapila @ 2018-09-04 05:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bf61873ae3b64e2883c1a9c7af8e5df788a7123c 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Prohibit pushing subqueries containing window function calculati @ 2018-09-04 05:51 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Amit Kapila @ 2018-09-04 05:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2ce253cf57b1c3f8100a31f30647449d0b88fe24 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Prohibit pushing subqueries containing window function calculati @ 2018-09-04 05:51 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Amit Kapila @ 2018-09-04 05:51 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-09-04 05:51 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-09-04 05:51 pgsql: Prohibit pushing subqueries containing window function calculati Amit Kapila <akapila@postgresql.org> 2018-09-04 05:51 pgsql: Prohibit pushing subqueries containing window function calculati Amit Kapila <akapila@postgresql.org> 2018-09-04 05:51 pgsql: Prohibit pushing subqueries containing window function calculati Amit Kapila <akapila@postgresql.org> 2018-09-04 05:51 pgsql: Prohibit pushing subqueries containing window function calculati Amit Kapila <akapila@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox