Skip to content

Commit ee1ae8b

Browse files
committed
Fix crash/valgrind error
Fix for commit 9ef1851: We have to skip indexes where sortopfamily is NULL. This takes the place of the previous btree check. Detected by valgrind on the buildfarm.
1 parent b4f453f commit ee1ae8b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/utils/adt/selfuncs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6329,6 +6329,10 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata,
63296329
ScanDirection indexscandir;
63306330
StrategyNumber strategy;
63316331

6332+
/* Ignore non-ordering indexes */
6333+
if (index->sortopfamily == NULL)
6334+
continue;
6335+
63326336
/*
63336337
* Ignore partial indexes --- we only want stats that cover the entire
63346338
* relation.

0 commit comments

Comments
 (0)