git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: c34787f) | patch
Fix YA incremental sort bug.
Fri, 5 Feb 2021 00:12:09 +0000 (19:12 -0500)
Fri, 5 Feb 2021 00:12:14 +0000 (19:12 -0500)
commit 82e0e29308dedbc6000e73329beb112ae7e1ad39
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
src/backend/executor/nodeIncrementalSort.c diff | blob | blame | history
src/test/regress/expected/incremental_sort.out diff | blob | blame | history
src/test/regress/sql/incremental_sort.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /