On 2019-Nov-15, Ranier Vilela wrote: > Hi, > Last time, I promise. > > It's probably not happening, but it can happen, I think.
This patch assumes that anything can happen after elog(ERROR). That's wrong -- under ERROR or higher, elog() (as well as ereport) never returns to the caller. If this was possible, there would be thousands of places that would need to be patched, all over the server code. But it's not. > /* Fetch opclass information */ > classtup = SearchSysCache1(CLAOID, ObjectIdGetDatum(opclassoid)); > - if (!HeapTupleIsValid(classtup)) > + if (!HeapTupleIsValid(classtup)) { > elog(ERROR, "cache lookup failed for operator class %u", > opclassoid); > + return false; > + } -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services