pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix YA incremental sort bug. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix YA incremental sort bug. @ 2021-02-05 00:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2021-02-05 00:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix YA incremental sort bug. switchToPresortedPrefixMode() did the wrong thing if it detected a batch boundary just at the last tuple of a fullsort group. The initially-reported symptom was a "retrieved too many tuples in a bounded sort" error, but the test case added here just silently gives the wrong answer without this patch. I (tgl) am not really happy about committing this patch without review from the incremental-sort authors, but they seem AWOL and we are hard against a release deadline. This does demonstrably make some cases better, anyway. Per bug #16846 from Yoran Heling. Back-patch to v13 where incremental sort was introduced. Neil Chen Discussion: https://postgr.es/m/16846-ae49f51ac379a4cb@postgresql.org Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/10fcb83da6a7c5328f61ca7fb60f78c57db1bd58 Modified Files -------------- src/backend/executor/nodeIncrementalSort.c | 7 +++++++ src/test/regress/expected/incremental_sort.out | 11 +++++++++++ src/test/regress/sql/incremental_sort.sql | 3 +++ 3 files changed, 21 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix YA incremental sort bug. @ 2021-02-05 00:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2021-02-05 00:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix YA incremental sort bug. switchToPresortedPrefixMode() did the wrong thing if it detected a batch boundary just at the last tuple of a fullsort group. The initially-reported symptom was a "retrieved too many tuples in a bounded sort" error, but the test case added here just silently gives the wrong answer without this patch. I (tgl) am not really happy about committing this patch without review from the incremental-sort authors, but they seem AWOL and we are hard against a release deadline. This does demonstrably make some cases better, anyway. Per bug #16846 from Yoran Heling. Back-patch to v13 where incremental sort was introduced. Neil Chen Discussion: https://postgr.es/m/16846-ae49f51ac379a4cb@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/82e0e29308dedbc6000e73329beb112ae7e1ad39 Modified Files -------------- src/backend/executor/nodeIncrementalSort.c | 7 +++++++ src/test/regress/expected/incremental_sort.out | 11 +++++++++++ src/test/regress/sql/incremental_sort.sql | 3 +++ 3 files changed, 21 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-02-05 00:12 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-02-05 00:12 pgsql: Fix YA incremental sort bug. Tom Lane <tgl@sss.pgh.pa.us> 2021-02-05 00:12 pgsql: Fix YA incremental sort bug. Tom Lane <tgl@sss.pgh.pa.us>
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