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
Don't be so trusting that shm_toc_lookup() will always succeed.
Given the possibility of race conditions and so on, it seems entirelyunsafe to just assume that shm_toc_lookup() always finds the key it'slooking for --- but that was exactly what all but one call site weredoing. To fix, add a "bool noError" argument, similarly to what wehave in many other functions, and throw an error on an unexpectedlookup failure. Remove now-redundant Asserts that a rather randomsubset of call sites had.I doubt this will throw any light on buildfarm member lorikeet'srecent failures, because if an unnoticed lookup failure were involved,you'd kind of expect a null-pointer-dereference crash rather than theobserved symptom. But you never know ... and this is better codingpractice even if it never catches anything.Discussion:https://postgr.es/m/9697.1496675981@sss.pgh.pa.us