-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash with IndexScan hints and ordering properties of index AMs
IndexScan hints on indexes that do not support ordering, like GiST or GIN would lead to crashes. The cause is a useless access to nonexistent arrays for ordering attributes in IndexOptInfo, as these indexes don't use that. Index AMs that exist out of PostgreSQL core could equally trigger this failure. Since we already confirmed that the attributes and the access methods are the same as the parent index, the two are assumed to have the same ordering properties, hence there should be no need to bother checking the ordering properties of the parent. This is a backpatch of the following commits, down to all supported versions: - 23cabaf, to fix a crash with indexes that do not support ordered operations, like GIN or GiST. - b48c7ae, to disable COSTS in the test added in the first commit. - 297defe, as an extra cleanup patch for the test. Thanks to Yusuke Egashira for pointing out that this fix was not backpatched properly. Author: Masahiro Ikeda Backpatch-through: 11
- Loading branch information
Showing
3 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters