pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix yet another issue with step generation in partition pruning. 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix yet another issue with step generation in partition pruning. @ 2020-08-07 05:49 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Etsuro Fujita @ 2020-08-07 05:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition key numbers, but the caller failed to ensure this for range partitioning, which led to an assertion failure in debug builds. Adjust the caller function to arrange the clauses in the prefix list in the required order for range partitioning. Back-patch to v11, like the previous commit. Patch by me, reviewed by Amit Langote. Discussion: https://postgr.es/m/CAPmGK16jkXiFG0YqMbU66wte-oJTfW6D1HaNvQf%3D%2B5o9%3Dm55wQ%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/199cec9779504c08aaa8159c6308283156547409 Modified Files -------------- src/backend/partitioning/partprune.c | 138 +++++++++++++++----------- src/test/regress/expected/partition_prune.out | 10 ++ src/test/regress/sql/partition_prune.sql | 5 + 3 files changed, 96 insertions(+), 57 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix yet another issue with step generation in partition pruning. @ 2020-08-07 05:49 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Etsuro Fujita @ 2020-08-07 05:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition key numbers, but the caller failed to ensure this for range partitioning, which led to an assertion failure in debug builds. Adjust the caller function to arrange the clauses in the prefix list in the required order for range partitioning. Back-patch to v11, like the previous commit. Patch by me, reviewed by Amit Langote. Discussion: https://postgr.es/m/CAPmGK16jkXiFG0YqMbU66wte-oJTfW6D1HaNvQf%3D%2B5o9%3Dm55wQ%40mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1db9c80f835e436ca3c27bccf43135ebf7e3c62b Modified Files -------------- src/backend/partitioning/partprune.c | 138 +++++++++++++++----------- src/test/regress/expected/partition_prune.out | 11 ++ src/test/regress/sql/partition_prune.sql | 5 + 3 files changed, 97 insertions(+), 57 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix yet another issue with step generation in partition pruning. @ 2020-08-07 05:49 Etsuro Fujita <efujita@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Etsuro Fujita @ 2020-08-07 05:49 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix yet another issue with step generation in partition pruning. Commit 13838740f fixed some issues with step generation in partition pruning, but there was yet another one: get_steps_using_prefix() assumes that clauses in the passed-in prefix list are sorted in ascending order of their partition key numbers, but the caller failed to ensure this for range partitioning, which led to an assertion failure in debug builds. Adjust the caller function to arrange the clauses in the prefix list in the required order for range partitioning. Back-patch to v11, like the previous commit. Patch by me, reviewed by Amit Langote. Discussion: https://postgr.es/m/CAPmGK16jkXiFG0YqMbU66wte-oJTfW6D1HaNvQf%3D%2B5o9%3Dm55wQ%40mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/79a3ab1e98d6b5952e29ad91e07c0e9fc777cc0b Modified Files -------------- src/backend/partitioning/partprune.c | 138 +++++++++++++++----------- src/test/regress/expected/partition_prune.out | 10 ++ src/test/regress/sql/partition_prune.sql | 5 + 3 files changed, 96 insertions(+), 57 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-08-07 05:49 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-08-07 05:49 pgsql: Fix yet another issue with step generation in partition pruning. Etsuro Fujita <efujita@postgresql.org> 2020-08-07 05:49 pgsql: Fix yet another issue with step generation in partition pruning. Etsuro Fujita <efujita@postgresql.org> 2020-08-07 05:49 pgsql: Fix yet another issue with step generation in partition pruning. Etsuro Fujita <efujita@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