Oliver Ford <ojf...@gmail.com> writes: > On Sat, Jan 27, 2018 at 7:40 AM, Erik Rijkers <e...@xs4all.nl> wrote: >> Regression tests only succeed for assert-disabled compiles; they fail when >> assert-enabled:
> Problem seems to be with an existing Assert in catcache.c:1545: > Assert(nkeys > 0 && nkeys < cache->cc_nkeys); > The "<" needs to be "<=" (and is changed in the attached patch). No, that Assert is correct, because it's in SearchCatCacheList. It doesn't make any sense to use SearchCatCacheList for a lookup that specifies all of the key columns, because then you necessarily have at most one match; you might as well use regular SearchCatCache, which is significantly more efficient. > AFAICT this was never a problem before purely because no code before > this patch called SearchSysCacheList4, so they always called with > fewer keys than the number available. Hm, probably we shouldn't even have that macro. regards, tom lane