You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Fix management of fn_extra caching during repeated GiST index scans.
Commitd22a09d introduced official supportfor GiST consistentFns that want to cache data using the FmgrInfo fn_extrapointer: the idea was to preserve the cached values across gistrescan(),whereas formerly they'd been leaked. However, there was an oversight inthat, namely that multiple scan keys might reference the same column'sconsistentFn; the code would result in propagating the same cache valueinto multiple scan keys, resulting in crashes or wrong answers. Use aseparate array instead to ensure that each scan key keeps its own state.Per bug #8143 from Joel Roller. Back-patch to 9.2 where the bug wasintroduced.