Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf22e17f

Browse files
Don't try to fix eliminated nbtree array scan keys.
Preprocessing for nbtree index scans allowed array "input" scan keysalready marked eliminated during array-specific preprocessing to be"fixed up" during preprocessing proper. This allowed eliminated scankeys on DESC index columns to spurious have their strategy commuted,causing assertion failures.To fix, teach _bt_fix_scankey_strategy to ignore these scan keys. Thisbrings it in line with its only caller, _bt_preprocess_keys.Oversight in commit5bf748b, which enhanced nbtree ScalarArrayOpexecution.Reported-By: Donghang Lin <donghanglin@gmail.com>Discussion:https://postgr.es/m/CAA=D8a2sHK6CAzZ=0CeafC-Y-MFXbYxnRSHvZTi=+JHu6kAa8Q@mail.gmail.com
1 parent9e72f6b commitf22e17f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎src/backend/access/nbtree/nbtutils.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3394,6 +3394,13 @@ _bt_fix_scankey_strategy(ScanKey skey, int16 *indoption)
33943394
return true;
33953395
}
33963396

3397+
if (skey->sk_strategy==InvalidStrategy)
3398+
{
3399+
/* Already-eliminated array scan key; don't need to fix anything */
3400+
Assert(skey->sk_flags&SK_SEARCHARRAY);
3401+
return true;
3402+
}
3403+
33973404
/* Adjust strategy for DESC, if we didn't already */
33983405
if ((addflags&SK_BT_DESC)&& !(skey->sk_flags&SK_BT_DESC))
33993406
skey->sk_strategy=BTCommuteStrategyNumber(skey->sk_strategy);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp